Skip to content

Instantly share code, notes, and snippets.

@thejmazz
Created December 9, 2016 04:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thejmazz/9760b75ea4e078856d79660a11fd4c65 to your computer and use it in GitHub Desktop.
Save thejmazz/9760b75ea4e078856d79660a11fd4c65 to your computer and use it in GitHub Desktop.
module.exports = {
entry: [
'./src/framework/index.js'
],
output: {
path: require('path').resolve(__dirname, './dist'),
filename: 'whitestorm.light.js'
},
devtool: 'source-map',
externals: [
function(ctx, req, cb) {
if (/.*\/physics.*/g.test(req)) return cb(null, 'var false');
cb();
}
],
module: {
loaders: [{
test: /\.js$/,
exclude: [
/node_modules/,
/ammo\.js/
],
loader: 'babel-loader',
query: {
cacheDirectory: true,
plugins: [
[ 'transform-runtime', { polyfill: false } ],
'add-module-exports',
'transform-decorators-legacy',
'transform-class-properties',
'transform-object-rest-spread'
],
presets: [
[ 'es2015', { modules: false } ]
]
}
}]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment