-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
34 lines (30 loc) · 1.06 KB
/
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
28
29
30
31
32
33
34
const path = require("path");
require("dotenv").config();
module.exports = {
exportTrailingSlash: true,
assetPrefix: process.env.ROOT_PREFIX,
webpack(config, options) {
config.resolve = {
alias: {
"@src": path.join(__dirname, "src"),
"@components": path.join(__dirname, "src", "components"),
"@core": path.join(__dirname, "src", "core"),
"@api": path.join(__dirname, "src", "core", "api"),
"@config": path.join(__dirname, "src", "core", "config"),
"@service": path.join(__dirname, "src", "core", "service"),
"@util": path.join(__dirname, "src", "core", "util"),
"@hooks": path.join(__dirname, "src", "hooks"),
"@models": path.join(__dirname, "src", "models"),
"@pages": path.join(__dirname, "src", "pages"),
"@store": path.join(__dirname, "src", "store"),
"@styles": path.join(__dirname, "src", "styles")
},
...config.resolve
};
return config;
},
env: {
RUNTIME_ENV: process.env.RUNTIME_ENV,
APP_API_URL: process.env.APP_API_URL
}
};