-
-
Save jeffryang24/d501c08a30fcf9f45dad17f77261d581 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const withTypescript = require('@zeit/next-typescript') | |
const withCss = require('@zeit/next-css') | |
const withSass = require('@zeit/next-sass'); | |
const withImages = require('next-images'); | |
const withOffline = require('next-offline'); | |
const withManifest = require('next-manifest') | |
const pipe = (...ops) => ops.reduce((a, b) => (arg) => b(a(arg))); | |
const isProd = process.env.NODE_ENV === 'production'; | |
const manifest = { | |
"short_name": "next-offline-test-app", | |
"name": "next-offline-test-app", | |
"description": "Reproduce a bug to help fix it", | |
"dir": "ltr", | |
"lang": "en", | |
"icons": [ | |
{ | |
"src": "favicon.ico", | |
"sizes": "64x64 32x32 24x24 16x16", | |
"type": "image/x-icon" | |
} | |
], | |
"start_url": "/", | |
"display": "standalone", | |
"theme_color": "#ffffff", | |
"background_color": "#ffffff" | |
} | |
const settings = { | |
webpack: function (config) { | |
return config; | |
}, | |
env: { | |
pagePrefix: isProd ? '/dash' : '', | |
apiUrl: '<redacted>' | |
}, | |
assetPrefix: isProd ? '<redacted>' : '', | |
manifest | |
} | |
const wrapper = pipe(withManifest, withOffline, withCss, withTypescript, withSass, withImages); | |
module.exports = wrapper(settings); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment