-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathwebpack.isomorphic.tools.js
More file actions
34 lines (29 loc) · 866 Bytes
/
Copy pathwebpack.isomorphic.tools.js
File metadata and controls
34 lines (29 loc) · 866 Bytes
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
const plugin = require('webpack-isomorphic-tools/plugin')
const config = {
webpackAssetsFilePath: '../webpack-assets.json',
webpackStatsFilePath: '../webpack-stats.json',
assets: {
scss: {
extensions: ['scss'],
filter: (module, regex, options, log) => {
if (options.development) {
return plugin.styleLoaderFilter(module, regex, options, log)
}
return regex.test(module.name)
},
path: (module, options, log) => {
if (options.development) {
return plugin.styleLoaderPathExtractor(module, options, log)
}
return module.name
},
parser: (module, options, log) => {
if (options.development) {
return plugin.cssModulesLoaderParser(module, options, log)
}
return module.source
}
}
}
}
module.exports = config