1 | var path = require('path');
|
2 | var webpack = require('webpack');
|
3 |
|
4 | module.exports = {
|
5 | devtool: 'cheap-module-source-map',
|
6 | entry: [
|
7 | './index.coffee'
|
8 | ],
|
9 | output: {
|
10 | libraryTarget: 'commonjs2',
|
11 | library: 'MeshbluHttp',
|
12 | path: path.join(__dirname, 'dist'),
|
13 | filename: 'bundle.js'
|
14 | },
|
15 | module: {
|
16 | loaders: [
|
17 | {
|
18 | test: /\.coffee$/, loader: 'coffee', include: /src/
|
19 | }
|
20 | ]
|
21 | },
|
22 | plugins: [
|
23 | new webpack.IgnorePlugin(/^(buffertools)$/),
|
24 | new webpack.NoErrorsPlugin(),
|
25 | new webpack.optimize.OccurenceOrderPlugin(),
|
26 | new webpack.DefinePlugin({
|
27 | 'process.env': {
|
28 | 'NODE_ENV': JSON.stringify('production')
|
29 | }
|
30 | }),
|
31 | new webpack.optimize.UglifyJsPlugin({
|
32 | compressor: {
|
33 | screw_ie8: true,
|
34 | warnings: false
|
35 | }
|
36 | })
|
37 | ]
|
38 | };
|