-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathwebpack.common.js
68 lines (66 loc) · 2.1 KB
/
webpack.common.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
const path = require('path');
const webpack = require('webpack');
const plugins = [
new webpack.ProvidePlugin({
THREE: "three"
}),
new webpack.ProvidePlugin({
CANNON: "cannon-es"
})
];
module.exports = {
entry: {
ball: './src/demo/ball/src',
get_ball: './src/demo/get_ball/src',
dance: './src/demo/dance/src',
vrm_animation: './src/demo/vrm_animation/src',
vrm_dance: './src/demo/vrm_dance/src',
bar: './src/demo/bar/src',
bar2: './src/demo/bar2/src',
salsa_lesson: './src/demo/salsa_lesson/src',
elements: './src/demo/elements/src',
ocean: './src/demo/ocean/src',
ship: './src/demo/ship/src',
beach: './src/demo/beach/src',
bvh_test: './src/demo/bvh_test/src',
bvh_test_2: './src/demo/bvh_test_2/src',
salsa_party: './src/demo/salsa_party/src',
salsa_party2: './src/demo/salsa_party2/src',
salsa_party3: './src/demo/salsa_party3/src',
salsa_party4: './src/demo/salsa_party4/src',
handinput_profiles: './src/demo/handinput_profiles/src',
mediapipe_face: './src/demo/mediapipe_face/src',
mediapipe_face_vrm: './src/demo/mediapipe_face_vrm/src',
webxr_vr_postprocessing: './src/demo/webxr_vr_postprocessing/src',
webxr_vr_postprocessing_unreal_bloom: './src/demo/webxr_vr_postprocessing_unreal_bloom/src',
moon_walk: './src/demo/moon_walk/src',
webgl_water: './src/demo/webgl_water/src',
threejs_water: './src/demo/threejs_water/src',
},
module: {
rules: [
{
test: /\.ts?$/,
use: 'ts-loader',
exclude: /node_modules/
}
]
},
plugins: plugins,
resolve: {
extensions: [ '.tsx', '.ts', '.js' ]
},
optimization: {
splitChunks: {
cacheGroups: {
commons: {
name: 'commons',
chunks: 'all'
}
}
}
},
output: {
filename: 'src/demo/[name]/dist/bundle.js'
}
};