-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
43 lines (42 loc) · 1.09 KB
/
next.config.js
File metadata and controls
43 lines (42 loc) · 1.09 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
36
37
38
39
40
41
42
43
const path = require('path');
module.exports = {
devIndicators: {
autoPrerender: false,
},
webpack(config, { isServer }) {
config.resolve.modules.unshift(config.context);
config.module.rules.push(
{
test: /\.(png|jpe?g|woff2?|mp3)$/,
use: {
loader: 'url-loader',
options: {
emitFile: isServer,
name: '[name]-[hash].[ext]',
limit: 8192,
publicPath: `/_next/static/`,
outputPath: `${isServer ? '../' : ''}static/`,
esModule: false,
},
},
},
{
test: /\.svg$/,
use: ['@svgr/webpack', 'svgo-loader'],
},
{
// All script source files
test: /\.(js|ts)x?$/,
exclude: /node_modules/,
use: [{ loader: 'prettier-loader', options: { parser: 'typescript' } }],
},
{
// All style module source files
test: /(\.module)\.css$/,
exclude: /node_modules/,
use: [{ loader: 'prettier-loader', options: { parser: 'css' } }],
},
);
return config;
},
};