Skip to content

Instantly share code, notes, and snippets.

@dachi023
Last active February 18, 2016 03:45
Show Gist options
  • Save dachi023/712440a4b881c70e6a3f to your computer and use it in GitHub Desktop.
Save dachi023/712440a4b881c70e6a3f to your computer and use it in GitHub Desktop.
var webpack = require('webpack');
module.exports = {
entry: {
// 起点となるファイルを指定
'bundle-hello' : './app-hello.js',
'bundle-backbone': './app-backbone.js'
},
output: {
// 出力先のパスを指定
path: __dirname,
// ビルド後のファイル名を指定
// [name]と書くとentryのキー値が代入される
// bundle-hello.js, bundle-backbone.js
filename: '[name].js'
},
plugins: {
// 圧縮するためのプラグイン
new webpack.optimize.UglifyJsPlugin()
},
// 開発しやすいようにソースマップも出力する
devtool: '#source-map'
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment