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

webpack.config.js (3 issues)

1 View Code Duplication
const package = require('./package.json');
0 ignored issues
show
The constant package seems to be never used. Consider removing it.
Loading history...
This code seems to be duplicated in your project.
Loading history...
2
const webpack = require('webpack');
0 ignored issues
show
The constant webpack seems to be never used. Consider removing it.
Loading history...
3
const path = require('path');
4
5
const config = {
6
    entry: './main.js',
7
    output: {
8
        path: path.normalize(__dirname + '/build'),
9
        publicPath: '',
10
        filename: 'index.js',
11
        library: '[name]',
12
        chunkFilename: '[name].[chunkhash].js'
13
    },
14
    devServer: {
15
        inline: true,
16
        port: 8888
17
    },
18
    module: {
19
        loaders: [
20
            {
21
                test: /\.jsx?$/,
22
                exclude: /node_modules/,
23
                loader: 'babel-loader',
24
                query: {
25
                    presets: ['es2015', 'react', 'stage-0'] // stage-2 = transform-object-rest-spread etc
26
                }
27
            },
28
            {
29
                test: /\.css$/,
30
                loader: 'style-loader!css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]'
31
            },
32
            {test: /\.(png|jpg)$/, loader: 'url-loader?limit=8192'}
33
        ]
34
    },
35
    externals: {
36
        'react/addons': true
37
    },
38
};
39
module.exports = config;
40