-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
49 lines (47 loc) · 1.6 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
// const withTypescript = require('@zeit/next-typescript');
// const { PHASE_DEVELOPMENT_SERVER } = require('next/constants');
// const { genSerial } = require('phusis');
// const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
// module.exports = withTypescript({
// distDir: '.build',
// generateEtags: true,
// onDemandEntries: {
// // period (in ms) where the server will keep pages in the buffer
// maxInactiveAge: 25 * 1000,
// // number of pages that should be kept simultaneously without being disposed
// pagesBufferLength: 2
// },
// pageExtensions: ['tsx', 'ts'],
// webpack(config, options) {
// if (options.isServer) config.plugins.push(new ForkTsCheckerWebpackPlugin());
// const { buildId, dev, isServer, defaultLoaders, webpack } = options;
// config.plugins.push(new webpack.IgnorePlugin(/\/__tests__\//));
// return config;
// },
// webpackDevMiddleware(config) {
// // Perform customizations to webpack dev middleware config
// // Important: return the modified config
// return config;
// },
// generateBuildId: async () => {
// // For example get the latest git commit hash here
// return genSerial();
// }
// });
const withTypescript = require('@zeit/next-typescript');
module.exports = withTypescript(
{
webpack(config, options) {
// Further custom configuration here
// config.node = {
// setImmediate: false,
// dgram: 'empty',
// fs: 'empty',
// net: 'empty',
// tls: 'empty',
// child_process: 'empty',
// };
return config;
}
}
);