mirror of
https://github.com/QingWei-Li/notea.git
synced 2024-11-29 12:53:00 +03:00
27 lines
522 B
JavaScript
27 lines
522 B
JavaScript
const withPWA = require('next-pwa')
|
|
const runtimeCaching = require('next-pwa/cache')
|
|
|
|
module.exports = withPWA({
|
|
target: process.env.NETLIFY ? 'serverless' : 'server',
|
|
|
|
future: {
|
|
webpack5: true,
|
|
},
|
|
|
|
webpack(config, { defaultLoaders }) {
|
|
config.module.rules.push({
|
|
test: /\.jsx/,
|
|
use: [defaultLoaders.babel],
|
|
include: [/node_modules\/heroicons/],
|
|
})
|
|
|
|
return config
|
|
},
|
|
|
|
pwa: {
|
|
disable: process.env.NODE_ENV === 'development',
|
|
dest: 'public',
|
|
runtimeCaching,
|
|
},
|
|
})
|