-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
50 lines (46 loc) · 1.25 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
const path = require('path')
const webpack = require('webpack')
const config = {
// TODO: Add common Configuration
module: {}
}
const fooConfig = Object.assign({}, config, {
entry: path.resolve(__dirname, 'public', 'scripts', 'app.js'),
output: { path: path.resolve(__dirname, 'public', 'scripts'), filename: 'bundle.js' },
watch: true,
plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery'
})
]
})
const barConfig = Object.assign({}, config, {
entry: path.resolve(__dirname, 'public', 'scripts', 'app2.js'),
output: { path: path.resolve(__dirname, 'public', 'scripts'), filename: 'bundle2.js' },
watch: true,
plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery'
})
]
})
const lolConfig = Object.assign({}, config, {
entry: path.resolve(__dirname, 'public', 'scripts', 'app3.js'),
output: { path: path.resolve(__dirname, 'public', 'scripts'), filename: 'bundle3.js' },
watch: true,
plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery'
})
]
})
// Return Array of Configurations
module.exports = [
fooConfig, barConfig, lolConfig
]