Skip to content

Instantly share code, notes, and snippets.

@ninjapanzer
Created March 29, 2016 17:19
Show Gist options
  • Select an option

  • Save ninjapanzer/2ac51df11b545b1d29fd58e1843ebfb1 to your computer and use it in GitHub Desktop.

Select an option

Save ninjapanzer/2ac51df11b545b1d29fd58e1843ebfb1 to your computer and use it in GitHub Desktop.
Webackjs
/*eslint-disable no-undef */
var path = require('path')
var webpack = require('webpack')
module.exports = {
context: __dirname + '/src',
entry: './app.js',
output: {
filename: 'app.js',
path: __dirname + '/dist'
},
devtool: '#source-map',
externals: {'jquery':'jQuery'},
plugins: [
new webpack.optimize.UglifyJsPlugin({minimize: true})
],
module: {
loaders: [
{
test: /\.js$/,
loaders: ['react-hot', 'babel'],
include: path.join(__dirname, 'src')
}
]
}
}
/*eslint-disable no-undef */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment