mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
85769c3d32
Fixes #4664
25 lines
541 B
JavaScript
25 lines
541 B
JavaScript
const withCSS = require('@zeit/next-css')
|
|
const webpack = require('webpack')
|
|
module.exports = withCSS({
|
|
onDemandEntries: {
|
|
// Make sure entries are not getting disposed.
|
|
maxInactiveAge: 1000 * 60 * 60
|
|
},
|
|
cssModules: true,
|
|
serverRuntimeConfig: {
|
|
mySecret: 'secret'
|
|
},
|
|
publicRuntimeConfig: {
|
|
staticFolder: '/static'
|
|
},
|
|
webpack (config, {buildId}) {
|
|
config.plugins.push(
|
|
new webpack.DefinePlugin({
|
|
'process.env.CONFIG_BUILD_ID': JSON.stringify(buildId)
|
|
})
|
|
)
|
|
|
|
return config
|
|
}
|
|
})
|