-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
42 lines (39 loc) · 1.07 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
;(() => {
const withCSS = require('@zeit/next-css')
const withLess = require('@zeit/next-less')
const withTypescript = require('@zeit/next-typescript')
const withPlugins = require('next-compose-plugins')
// fix: prevents error when .less files are required by node
if (typeof require !== 'undefined') {
require.extensions['.less'] = file => {}
}
module.exports = withPlugins(
[
withTypescript,
withCSS,
[
withLess,
{
lessLoaderOptions: {
javascriptEnabled: true,
modifyVars: {
'primary-color': '#0647a5',
'font-family': `'Noto Sans HK', Helvetica, Arial, sans-serif`,
'layout-sider-background': 'white',
'menu-dark-bg': 'none',
'menu-dark-item-active-bg': '#065ddc',
},
},
},
],
],
{
webpack(config, { buildId, dev, isServer, defaultLoaders, webpack }) {
if (dev) {
config.devtool = 'cheap-module-source-map'
}
return config
},
}
)
})()