-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
40 lines (36 loc) · 928 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
28
29
30
31
32
33
34
35
36
37
38
39
40
// next.config.js
// const withTypescript = require('@zeit/next-typescript')
// module.exports = withTypescript()
require('dotenv').config();
const isProd = process.env.NODE_ENV === 'production';
module.exports = {
inlineImageLimit: 16384,
publicRuntimeConfig: {
BASE_URL: process.env.BASE_URL, // Pass through env variables
API_PATH: process.env.API_PATH,
MAINAPP: process.env.MAINAPP,
},
webpack(config) {
config.module.rules.push({
test: /\.svg$/,
use: [{
loader: '@svgr/webpack',
options: {
dimensions: false,
}
}],
});
config.module.rules.push(
{
test: /\.(png|woff|woff2|eot|ttf|gif|jpg|ico)$/,
loader: 'url-loader',
options: {
name: '[name]_[hash].[ext]',
publicPath: `/_next/static/files`,
// outputPath: 'static/files'
}
},
);
return config;
}
};