1 | var path = require('path');
|
2 | var webpack = require('webpack');
|
3 |
|
4 | module.exports = {
|
5 | devtool: 'cheap-module-source-map',
|
6 | entry: [
|
7 | './src/index'
|
8 | ],
|
9 | output: {
|
10 | filename: 'bundle.js',
|
11 | path: path.join(__dirname, 'dist'),
|
12 | libraryTarget: 'umd',
|
13 | library: 'ReduxMeshblu'
|
14 | },
|
15 | node: {
|
16 | fs: "empty"
|
17 | },
|
18 | plugins: [
|
19 | new webpack.IgnorePlugin(/^(buffertools)$/),
|
20 | new webpack.DefinePlugin({
|
21 | 'process.env': {
|
22 | 'NODE_ENV': JSON.stringify('production')
|
23 | }
|
24 | }),
|
25 | new webpack.NoErrorsPlugin(),
|
26 | new webpack.optimize.OccurenceOrderPlugin(),
|
27 | new webpack.optimize.UglifyJsPlugin({
|
28 | compress: {
|
29 | warnings: false
|
30 | }
|
31 | })
|
32 | ],
|
33 | resolve: {
|
34 | extensions: ['', '.js', '.jsx', '.json'],
|
35 | alias: {
|
36 | config: path.join(__dirname, 'src', 'config', 'production')
|
37 | }
|
38 | },
|
39 | module: {
|
40 | loaders: [
|
41 | {
|
42 | test: /\.js$/,
|
43 | loaders: ['babel'],
|
44 | include: path.join(__dirname, 'src')
|
45 | }
|
46 | ]
|
47 | }
|
48 | };
|