-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
webpack.config.prod.ts
59 lines (57 loc) · 1.36 KB
/
webpack.config.prod.ts
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
import path from 'path';
import webpack from 'webpack';
const config: webpack.Configuration = {
entry: {
'mindar-image': './src/image-target/index.ts',
'mindar-image-aframe': './src/image-target/aframe.ts',
'mindar-image-three': './src/image-target/three.ts',
'mindar-face': './src/face-target/index.ts',
'mindar-face-aframe': './src/face-target/aframe.ts',
'mindar-face-three': './src/face-target/three.ts',
'mindar-location': './src/geo-location/index.ts',
'mindar-location-aframe': './src/geo-location/aframe.ts',
'mindar-gesture': './src/gesture-action/aframe.ts',
},
mode: 'production',
output: {
filename: '[name].prod.js',
path: path.resolve(__dirname, 'dist'),
publicPath: '',
},
module: {
rules: [
{
test: /\.worker\.ts$/,
loader: 'worker-loader',
options: {
inline: 'no-fallback',
},
},
{
test: /\.ts$/,
use: 'ts-loader',
exclude: /node_modules/,
},
{
test: /\.s[ac]ss$/i,
use: ['style-loader', 'css-loader', 'sass-loader'],
},
{
test: /\.html$/,
use: 'html-loader',
},
],
},
stats: {
children: true,
},
resolve: {
extensions: ['.ts', '.js'],
fallback: {
fs: false,
path: false,
crypto: false,
},
},
};
export default config;