-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.ts
44 lines (42 loc) · 906 Bytes
/
webpack.config.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
import * as path from "path"
import * as webpack from "webpack"
const webpackConfig: webpack.Configuration = {
entry: `./src/index.tsx`,
mode: "development",
output: {
filename: `boardlayout.js`,
chunkFilename: "[name].chunk.js",
path: path.resolve(__dirname, "webpackDist")
},
plugins: [
],
module: {
rules: [ {
test: /\.(jpe?g|png|gif|svg|wasm)$/i,
use: `file-loader`
}, {
test: /\.(css)$/i,
use: [
{
loader: `style-loader`
}, {
loader: `css-loader`
}
]
}, {
test: /\.tsx?$/,
loader: "ts-loader"
}
]
},
resolve: {
extensions: [".ts", ".tsx", ".js", ".json"],
alias: {
},
fallback: {
"buffer": require.resolve("buffer"),
"stream": require.resolve("stream-browserify")
}
}
}
export default webpackConfig