-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathnext.config.js
More file actions
32 lines (30 loc) · 743 Bytes
/
Copy pathnext.config.js
File metadata and controls
32 lines (30 loc) · 743 Bytes
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
const withCSS = require('@zeit/next-css');
const withFonts = require('next-fonts');
const withImages = require('next-images');
const withPlugins = require('next-compose-plugins');
module.exports = withPlugins([
withCSS({
webpack: (config, { isServer }) => {
// Fixes npm packages that depend on `fs` module
if (!isServer) {
config.node = {
fs: 'empty',
};
}
config.module.rules.push({
test: /.(eot|woff|woff2|ttf|svg|png|jpg|gif)$/,
use: { loader: 'url-loader', options: { limit: 100000, name: '[name].[ext]' } },
});
return config;
},
exportTrailingSlash: true,
distDir: 'build',
exportPathMap: function () {
return {
'/': { page: '/' },
};
},
}),
withFonts,
withImages,
]);