-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
70 lines (69 loc) · 1.17 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
62
63
64
65
66
67
68
69
70
import path from "path";
import ForkTsCheckerWebpackPlugin from "fork-ts-checker-webpack-plugin";
import HtmlWebpackPlugin from "html-webpack-plugin";
export default {
experiments: {
asyncWebAssembly: true,
},
entry: './src/index.tsx',
devServer: {
static: ['dist'],
host: '0.0.0.0',
proxy: {
}
},
externals: {
vscode: 'commonjs vscode'
},
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
},
{
test: /\.(png|jpe?g|gif|svg|pdf)$/,
use: [{
loader: 'file-loader',
options: {
name: '[path][name].[ext]',
esModule: false,
}
}]
},
{
test: /\.(mp3|wasm)$/i,
type: 'asset/resource'
}
]
},
resolve: {
extensions: ['.ts', '.js', '.tsx'],
extensionAlias: {
'.js': ['.js', '.ts', '.tsx']
},
fallback: {
"buffer": false,
"stream": false,
},
},
performance: {
hints: false
},
output: {
filename: 'index.js',
path: path.resolve('dist'),
clean: true
},
plugins: [
new ForkTsCheckerWebpackPlugin(),
new HtmlWebpackPlugin({
name: "Webpack Bundling Demo"
})
]
};