You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
carbon/next.config.js

25 lines
709 B
JavaScript

const bundleAnalyzer = require('@next/bundle-analyzer')
const withOffline = require('next-offline')
const withBundleAnalyzer = bundleAnalyzer({ enabled: process.env.ANALYZE === 'true' })
module.exports = withBundleAnalyzer(
withOffline({
target: 'serverless',
dontAutoRegisterSw: true,
// https://github.com/hanford/next-offline/blob/master/packages/now2-example/next.config.js
workboxOpts: {
swDest: 'static/service-worker.js',
},
webpack: (config, options) => {
config.module.rules.push({
test: /\.js$/,
include: /node_modules\/graphql-language-service-parser/,
use: [options.defaultLoaders.babel],
})
return config
},
})
)