forked from zakaton/Pink-Trombone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
36 lines (31 loc) · 987 Bytes
/
webpack.config.js
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
31
32
33
34
35
36
const path = require('path');
const whichFile = "component";
module.exports = {
entry: {
app : {
"component" : './script/component.js',
"pink-trombone" : './script/audio/nodes/pinkTrombone/processors/WorkletProcessor.js',
}[whichFile]
// app: './script/component.js'
// app: './script/audio/nodes/pinkTrombone/processors/WorkletProcessor.js'
},
output: {
path: path.resolve(__dirname, 'build'),
filename : {
"component" : 'pink-trombone.min.js',
"pink-trombone" : 'pink-trombone-worklet-processor.min.js',
}[whichFile]
// filename: 'pink-trombone.min.js'
// filename: 'pink-trombone-worklet-processor.min.js'
},
module: {
rules: [{
test: /\.js?$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['@babel/env']
}
}]
}
}