Completed
Push — master ( a7c905...99ab39 )
by Arthur
02:22
created

webpack.config.prod.js (1 issue)

Severity
1
const package = require('./package.json');
2
const path = require('path');
3
4
const config = {
5
    mode: 'production',
6
    entry: './main.prod.js',
7
    output: {
8
        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...
9
        publicPath: '',
10
        filename: 'index.js',
11
        library: '[name]',
12
        chunkFilename: '[name].[chunkhash].js',
13
        libraryTarget: 'umd',
14
        umdNamedDefine: true
15
    },
16
    devServer: {
17
        inline: true,
18
        port: 8888
19
    },
20
    module: {
21
        rules: [
22
            {
23
                test: /\.jsx?$/,
24
                exclude: /node_modules/,
25
                loader: 'babel-loader',
26
                query: {
27
                    presets: ['es2015', 'react', 'stage-0'] // stage-2 = transform-object-rest-spread etc
28
                }
29
            },
30
            {
31
                test: /\.css$/,
32
                loader: 'style-loader!css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]'
33
            },
34
            {test: /\.(png|jpg)$/, loader: 'url-loader?limit=8192'}
35
        ]
36
    },
37
    plugins: []
38
        .concat(require('./helpers/plugins/injectVars')({
39
            bundleName: package.name,
40
            bundleVersion: package.version,
41
            bundleDescription: package.description,
42
            bundleAuthor: package.author,
43
            isPlatform: false,
44
        })),
45
    externals: {
46
        'react/addons': true
47
    }
48
};
49
module.exports = config;
50