mirror of
https://github.com/scratchfoundation/scratch-audio.git
synced 2024-12-21 21:42:31 -05:00
c40105cf07
Use src/index for browser entry point
30 lines
788 B
JavaScript
30 lines
788 B
JavaScript
var path = require('path');
|
|
|
|
module.exports = {
|
|
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
|
|
devtool: 'cheap-module-source-map',
|
|
entry: {
|
|
dist: './src/index.js'
|
|
},
|
|
output: {
|
|
path: __dirname,
|
|
library: 'AudioEngine',
|
|
libraryTarget: 'commonjs2',
|
|
filename: '[name].js'
|
|
},
|
|
module: {
|
|
rules: [{
|
|
test: /\.js$/,
|
|
include: path.resolve(__dirname, 'src'),
|
|
loader: 'babel-loader',
|
|
options: {
|
|
presets: [['env', {targets: {browsers: ['last 3 versions', 'Safari >= 8', 'iOS >= 8']}}]]
|
|
}
|
|
}]
|
|
},
|
|
externals: {
|
|
'audio-context': true,
|
|
'minilog': true,
|
|
'startaudiocontext': true
|
|
}
|
|
};
|