Skip to content

Instantly share code, notes, and snippets.

@dphurley
Created April 4, 2017 01:04
Show Gist options
  • Save dphurley/691ed490583d255b852c920a285aa522 to your computer and use it in GitHub Desktop.
Save dphurley/691ed490583d255b852c920a285aa522 to your computer and use it in GitHub Desktop.
{
"ignore": [
"./public/*/*.js",
"./client/*/*.js"
]
}
npm install --save-dev babel-core babel-loader babel-preset-env
require('webpack');
var glob = require('glob');
module.exports = {
context: __dirname,
entry: {
app: glob.sync(__dirname + '/client/**/*.js')
},
output: {
path: __dirname + '/public/js',
filename: '[name].bundle.js'
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader'
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment