forked from scratchfoundation/scratch-audio
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
30 lines (29 loc) · 788 Bytes
/
webpack.config.js
File metadata and controls
30 lines (29 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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
}
};