Total Complexity | 1 |
Complexity/F | 0 |
Lines of Code | 24 |
Function Count | 0 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | var Path = require('path') |
||
2 | |||
3 | var configuration = { |
||
4 | entry: Path.resolve(__dirname, 'src/script.js'), |
||
5 | output: { |
||
6 | path: Path.resolve(__dirname, 'dist'), |
||
7 | filename: 'script.js' |
||
8 | } |
||
9 | } |
||
10 | |||
11 | if (process.env.NODE_ENV === 'production') { |
||
12 | configuration.module = { |
||
13 | rules: [ |
||
14 | { |
||
15 | test: {not: [/script\.js$/]}, |
||
16 | use: [ |
||
17 | { loader: 'uglify-loader-2' } |
||
18 | ] |
||
19 | } |
||
20 | ] |
||
21 | } |
||
22 | } |
||
23 | |||
24 | module.exports = configuration |
||
25 |