mirror of
https://github.com/scratchfoundation/scratch-audio.git
synced 2024-12-22 05:53:43 -05:00
d5d6ab9eb8
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.
29 lines
638 B
JavaScript
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
|
|
}
|
|
};
|