Created
March 16, 2016 12:19
-
-
Save kaflan/3344038b9227bc55dfc2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require('path'); | |
var webpack = require('webpack'); | |
var ngAnnotatePlugin = require('ng-annotate-webpack-plugin'); | |
const NODE_ENV = process.env.NODE_ENV || 'development'; | |
module.exports = { | |
// context: __dirname + '/public/scripts/app', | |
entry: { | |
bundle: __dirname + '/public/scripts/app/index.js' | |
}, | |
output: { | |
path: __dirname + '/public/scripts/dist', | |
filename: '[name].js' | |
}, | |
module: { | |
loaders: [{ | |
test: /\.js$/, | |
loader: 'babel' | |
}, { | |
test: /\.html$/, | |
loader: 'raw' | |
}, { | |
test: /\.css$/, | |
loader: "style-loader!css-loader" | |
}, { | |
test: /\.png$/, | |
loader: "url-loader?limit=100000" | |
}, { | |
test: /\.jpg$/, | |
loader: "file-loader" | |
}] | |
}, | |
plugins: [ | |
new ngAnnotatePlugin({ | |
add: true, | |
}), | |
new webpack.optimize.UglifyJsPlugin({ | |
compress: { | |
warnings: false, | |
drop_console: true, | |
unsafe: true | |
} | |
}) | |
], | |
watch: true, | |
watchOptions: { | |
aggregateTimeout: 100 | |
}, | |
devServer: { | |
contentBase: __dirname + '/public', | |
hot: true | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment