-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
37 lines (36 loc) · 1016 Bytes
/
webpack.config.js
File metadata and controls
37 lines (36 loc) · 1016 Bytes
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
const path = require("path");
module.exports = {
mode: 'development',
// specify the entry file and the bundled output file
// use node.js path handling/resolving features
entry: "./src/app.ts",
devServer: {
static: [
{
directory: path.join(__dirname),
},
],
},
output: {
filename: "bundle.js",
path: path.resolve(__dirname, "dist"),
publicPath: "/dist/",
},
// webpack support for debugging... ensure "sourceMap": true in tsconfig.js
devtool: "inline-source-map",
// tell webpack how to deal with typescript
module: {
rules: [
{
test: /\.ts$/,
use: "ts-loader",
exclude: /node_modules/,
},
],
},
// tell webpack what to look for in imports
// basically, this means you can remove "*.js" from your ES module import statements
resolve: {
extensions: [".ts", ".js"],
},
};