-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
61 lines (61 loc) · 1.47 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
const withSass = require('@zeit/next-sass');
const path = require('path');
module.exports = withSass({
webpack: config => {
config.module.rules.push(
{
test: /\.js(?:|x)$/,
resolve: {
extensions: ['.js', '.jsx']
},
exclude: path.join(__dirname, './node_modules/'),
use: ['babel-loader']
},
{
test: /\.(jpe(?:|g)|png|gif|svg)$/i,
loaders: [
{
loader: 'url-loader',
options: {
limit: 8000, // Convert images < 8kb to base64 strings
name: '[path][name].[ext]',
outputPath: path.resolve(__dirname, 'dist'),
publicPath: './dist/'
}
},
{
loader: 'image-webpack-loader',
options: {
mozjpeg: {
progressive: true,
quality: 65
},
optipng: {
enabled: false
},
pngquant: {
quality: '65-90',
speed: 4
},
gifsicle: {
interlaced: false
},
webp: {
quality: 75
}
}
}
]
}
);
return config;
},
exportPathMap: function () {
return {
'/': { page: '/login' },
'/login': { page: '/login' },
'/home': { page: '/home' },
'/register': { page: '/register' }
}
}
});