-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
35 lines (32 loc) · 1.02 KB
/
next.config.js
File metadata and controls
35 lines (32 loc) · 1.02 KB
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
32
33
34
35
module.exports = {
env: {
SESSION_SECRET: process.env.SESSION_SECRET,
NEXT_PUBLIC_API_URL:
process.env.NEXT_PUBLIC_API_URL || 'https://localhost:3000',
},
// images: {
// domains: [process.env.NEXT_PUBLIC_IMAGE_HOST],
// },
eslint: {
ignoreDuringBuilds: true,
},
/**
* When working on a package, it is annoying to have to restart
* nextjs every time you make a change. By default nextjs does not watch
* the node_modules folder for changes. This update makes it so that if
* you have the env variable DEV_PACKAGE_MODE set to 'true' then it will
* watch node_modules for changes to the files.
* From my experience this works well with the yalc library that you can use
* in the package you're building.
**/
webpack: (config, { dev }) => {
const DEV_PACKAGE_MODE = process.env.DEV_PACKAGE_MODE == 'true'
if (dev && DEV_PACKAGE_MODE) {
config.watchOptions = {
followSymlinks: true,
}
config.snapshot.managedPaths = [];
}
return config;
},
}