generated from marquizzo/three.ts-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
49 lines (44 loc) · 907 Bytes
/
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
const webpack = require("webpack");
const path = require("path");
// http://webpack.github.io/docs/configuration.html
module.exports = {
entry:{
main: "./src/App.ts",
},
// Outputs compiled bundle to `./web/js/main.js`
output:{
path: __dirname + "/web/",
filename: "js/[name].js"
},
resolve: {
extensions: [".webpack.js", ".web.js", ".ts", ".tsx", ".js"],
alias: {
"@": path.resolve(__dirname, "./src/"),
},
},
module:{
// Test file extension to run loader
rules: [
{
test: /\.(glsl|vs|fs)$/,
loader: "ts-shader-loader"
},
{
test: /\.tsx?$/,
exclude: [/node_modules/, /tsOld/],
loader: "ts-loader"
},
{
test: /\.csv$/,
loader: 'raw-loader'
}
]
},
// Enables dev server to be accessed by computers in local network
devServer: {
host: "0.0.0.0",
port: 8000,
publicPath: "/web/",
disableHostCheck: true
}
}