forked from notea-org/notea
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
31 lines (26 loc) · 701 Bytes
/
next.config.js
File metadata and controls
31 lines (26 loc) · 701 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const withPWA = require('next-pwa')
const runtimeCaching = require('next-pwa/cache')
const path = require('path')
module.exports = withPWA({
future: {
/**
* FIXME
* https://github.com/netlify/netlify-plugin-nextjs/issues/209
*/
webpack5: process.env.NETLIFY ? false : true,
},
target: process.env.NETLIFY ? 'serverless' : 'server',
webpack(config, { defaultLoaders }) {
config.module.rules.push({
test: /\.jsx/,
use: [defaultLoaders.babel],
include: [path.resolve(__dirname, 'node_modules/heroicons')],
})
return config
},
pwa: {
disable: process.env.NODE_ENV === 'development',
dest: 'public',
runtimeCaching,
},
})