Issues (18)

webpack.config.js (1 issue)

Severity
1
const path = require('path');
2
3
const config = {
4
    mode: 'development',
5
    entry: './main.js',
6
    output: {
7
        path: path.normalize(__dirname + '/build'),
0 ignored issues
show
Consider using the path module for constructing paths since they are otherwise not cross-OS compatible.
Loading history...
8
        publicPath: '',
9
        filename: 'index.js',
10
        library: '[name]',
11
        chunkFilename: '[name].[chunkhash].js'
12
    },
13
    devServer: {
14
        inline: true,
15
        port: 8888
16
    },
17
    module: {
18
        rules: [
19
            {
20
                test: /\.jsx?$/,
21
                exclude: /node_modules/,
22
                loader: 'babel-loader',
23
                query: {
24
                    presets: ['es2015', 'react', 'stage-0'] // stage-2 = transform-object-rest-spread etc
25
                }
26
            },
27
            {
28
                test: /\.css$/,
29
                loader: 'style-loader!css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]'
30
            },
31
            {test: /\.(png|jpg)$/, loader: 'url-loader?limit=8192'}
32
        ]
33
    },
34
    externals: {
35
        'react/addons': true
36
    },
37
    node: {
38
        console: false,
39
        fs: 'empty',
40
        net: 'empty',
41
        tls: 'empty'
42
    }
43
};
44
module.exports = config;