Completed
Push — master ( f541a0...43265b )
by Arthur
31s
created

webpack.config.prod.js (3 issues)

1 View Code Duplication
const package = require('./package.json');
0 ignored issues
show
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.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
      loaders: [
22
         {
23
            test: /\.jsx?$/,
24
            exclude: /node_modules/,
25
            loader: 'babel-loader',
26
            query: {
27
               presets: ['es2015', 'react']
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
     .concat(require('./helpers/plugins/css'))
46
     .concat(require('./helpers/plugins/uglify'))
47
     .concat(require('./helpers/plugins/html')),
48
   externals: {
49
     'react/addons': true
50
   }
51
}
52
module.exports = config;
53