-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnext.config.js
27 lines (25 loc) · 846 Bytes
/
next.config.js
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
const path = require('path');
const dev = require('./environments/shared/dev.json');
const prod = require('./environments/shared/prod.json');
const stage = require('./environments/shared/stage.json');
const local = require('./environments/shared/local.json');
module.exports = () => ({
webpack: (config) => {
/* Next JS path aliases */
config.resolve.alias['root'] = path.join(__dirname);
config.resolve.alias['src'] = path.join(__dirname, 'src');
config.module.rules.push({
test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff2)$/,
use: {
loader: 'url-loader',
options: {
limit: 100000,
},
},
});
return config;
},
publicRuntimeConfig: {
env: {local, dev, stage, prod},
}
});