-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.js
21 lines (19 loc) · 912 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
const path = require('path');
const withCSS = require('@zeit/next-css');
// Used to set folders as alias to directly use in nextjs
const nextConfiguration = withCSS({
publicRuntimeConfig: {
// Will be available on both server and client
NODE_ENV: process.env.NODE_ENV,
},
webpack: (config) => {
const newConfig = config;
newConfig.resolve.alias.utilities = path.join(__dirname, 'utilities'); // folder alias 1
newConfig.resolve.alias.components = path.join(__dirname, 'components'); // folder alias 2
newConfig.resolve.alias.components = path.join(__dirname, 'storeon'); // folder alias 3
newConfig.resolve.alias.components = path.join(__dirname, 'services'); // folder alias 4
newConfig.resolve.alias.components = path.join(__dirname, 'stores'); // folder alias 5
return newConfig;
},
});
module.exports = nextConfiguration;