forked from kosslab-kr/kosscontributhon2018
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
39 lines (37 loc) · 885 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
const withPlugins = require('next-compose-plugins');
const withCSS = require('@zeit/next-css');
const withLess = require('@zeit/next-less');
const withSass = require('@zeit/next-sass');
const withTypescript = require('@zeit/next-typescript');
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
module.exports = withPlugins([
[
withTypescript,
{
webpack(config, options) {
// Do not run type checking twice:
if (options.isServer) config.plugins.push(new ForkTsCheckerWebpackPlugin());
return config;
},
},
],
[
withLess,
{
lessLoaderOptions: {
javascriptEnabled: true,
},
},
],
[withSass],
[
withCSS,
{
cssModules: true,
cssLoaderOptions: {
importLoaders: 1,
localIdentName: '[local]___[hash:base64:5]',
},
},
],
]);