forked from ecency/ecency-vision
-
Notifications
You must be signed in to change notification settings - Fork 5
/
razzle.config.js
26 lines (25 loc) · 921 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
'use strict';
module.exports = {
plugins: ['typescript', 'scss'],
options: {
buildType: 'iso'
},
modifyWebpackConfig({
env: {
target, // the target 'node' or 'web'
dev, // is this a development build? true or false
},
webpackConfig, // the created webpack config
webpackObject, // the imported webpack node module
options: {
pluginOptions, // the options passed to the plugin ({ name:'pluginname', options: { key: 'value'}})
razzleOptions, // the modified options passed to Razzle in the `options` key in `razzle.config.js` (options: { key: 'value'})
webpackOptions, // the modified options that was used to configure webpack/ webpack loaders and plugins
},
paths, // the modified paths that will be used by Razzle.
}) {
// Do some stuff to webpackConfig
webpackConfig.devtool = dev ? 'source-map' : false;
return webpackConfig;
}
};