scratch-audio/webpack.config.js
Michael "Z" Goddard d5d6ab9eb8
Depend on script dependencies for downstream webpack
Downstream webpack will need any dependencies src/ depends on so it can
successfully build. Also if multiple packages being built into a larger
script share a common dependency version range, they can share the
dependency instead of duplicating it. This will save built file size,
execution time, and memory.
2018-05-08 11:13:05 -04:00

29 lines
638 B
JavaScript

var path = require('path');
module.exports = {
devtool: 'cheap-module-source-map',
entry: {
dist: './src/index.js'
},
output: {
path: __dirname,
library: 'AudioEngine',
libraryTarget: 'commonjs2',
filename: '[name].js'
},
module: {
loaders: [{
test: /\.js$/,
loader: 'babel-loader',
include: path.resolve(__dirname, 'src'),
query: {
presets: ['es2015']
}
}]
},
externals: {
'audio-context': true,
'minilog': true,
'startaudiocontext': true
}
};