-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrazzle.config.js
26 lines (21 loc) · 886 Bytes
/
razzle.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
const nodeSassLoader = require('./config/plugins/razzle.nodeSassLoader');
const webSassLoader = require('./config/plugins/razzle.webSassLoader');
const webpackResolveAlias = require('./config/plugins/razzle.webpackResolveAlias');
const webLoadablePlugin = require('./config/plugins/razzle.webLoadablePlugin');
module.exports = {
plugins: [
{ name: 'typescript', options: { useBabel: true } },
{ name: 'scss', options: { postcss: { dev: { sourceMap: false } } } },
],
modify: (config, { target, dev }) => {
const modifications = [];
modifications.push(webpackResolveAlias(config));
if (target === 'web') {
modifications.push(webLoadablePlugin(config));
// modifications.push(webSassLoader(config, dev));
} else {
// modifications.push(nodeSassLoader(config));
}
return Object.assign({}, config, ...modifications);
},
};