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