Issues (109)

webpack.config.js (1 issue)

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
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