Passed
Push — master ( 8dc44f...34bf37 )
by
unknown
11:57 queued 09:39
created

webpack.config.js   A

Complexity

Total Complexity 1
Complexity/F 0

Size

Lines of Code 39
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 25
mnd 1
bc 1
fnc 0
dl 0
loc 39
rs 10
bpm 0
cpm 0
noi 1
c 0
b 0
f 0
1
/* global process */
2
const webpack = require('webpack');
3
4
// fix for https://github.com/webpack/webpack/issues/2537
5
if (process.argv.indexOf('-p') !== -1) {
6
    process.env.NODE_ENV = 'production';
7
}
8
9
module.exports = {
10
    entry: './script/main.js',
11
    output: {
12
        path: __dirname +  '/lib',
0 ignored issues
show
Compatibility introduced by
Consider using the path module for constructing paths since they are otherwise not cross-OS compatible.
Loading history...
13
        filename: 'bundle.js',
14
    },
15
    module: {
16
        rules: [
17
            {
18
                loader: 'eslint-loader',
19
                exclude: /node_modules/,
20
                enforce: 'pre',
21
                options: {
22
                    fix: true,
23
                },
24
            },
25
            {
26
                test: /\.js?$/,
27
                exclude: /node_modules/,
28
                use: {
29
                    loader: 'babel-loader',
30
                    options: {
31
                        babelrc: true,
32
                    },
33
                },
34
            },
35
        ],
36
    },
37
    plugins: [
38
        new webpack.NoEmitOnErrorsPlugin(),
39
    ],
40
};
41