-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
61 lines (53 loc) · 1.52 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
51
52
53
54
55
56
57
58
59
60
61
'use strict'
const webpack = require('webpack')
const path = require('path')
function resolve (dir) {
return path.join(__dirname, '.', dir)
}
const config = {
mode: process.env.NODE_ENV,
entry: './scripts/script.js',
output: {
path: resolve('./spark-project/scripts'),
filename: 'script.js'
},
externals: {
Animation: 'commonjs Animation',
Diagnostics: 'commonjs Diagnostics',
FaceTracking: 'commonjs FaceTracking',
Audio: 'commonjs Audio',
DeviceMotion: 'commonjs DeviceMotion',
FaceTracking2D: 'commonjs FaceTracking2D',
FaceGestures: 'commonjs FaceGestures',
Fonts: 'commonjs Fonts',
HandTracking: 'commonjs HandTracking',
Instruction: 'commonjs Instruction',
IrisTracking: 'commonjs IrisTracking',
LightingEstimation: 'commonjs LightingEstimation',
LiveStreaming: 'commonjs LiveStreaming',
Locale: 'commonjs Locale',
Patches: 'commonjs Patches',
NativeUI: 'commonjs NativeUI',
Persistence: 'commonjs Persistence',
PersonSegmentation: 'commonjs PersonSegmentation',
Random: 'commonjs Random',
Reactive: 'commonjs Reactive',
Shaders: 'commonjs Shaders',
Scene: 'commonjs Scene',
Time: 'commonjs Time',
TouchGestures: 'commonjs TouchGestures',
CameraInfo: 'commonjs CameraInfo',
Materials: 'commonjs Materials',
Textures: 'commonjs Textures'
},
module: {
rules: [
{
test: /\.js$/,
use: { loader: 'babel-loader' },
exclude: /node_modules/
}
]
}
}
module.exports = config