-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathwebpack.config.js
More file actions
35 lines (34 loc) · 812 Bytes
/
Copy pathwebpack.config.js
File metadata and controls
35 lines (34 loc) · 812 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
const path = require("path")
const site = require("./scripts/site")
module.exports = {
entry: {
main: "./theme/js/main.ts",
bootstrap: "./theme/js/bootstrap.ts",
sw: "./theme/js/sw.ts",
"blog-index": "./theme/js/blog-index.ts"
},
output: {
filename: "[name].js",
publicPath: `${site.url.path}/assets/scripts/`
},
resolve: {
alias: {
_style: path.resolve(__dirname, "theme/styl/"),
"_style-lazy": path.resolve(__dirname, "theme/styl/lazy/")
},
extensions: [".ts", ".tsx", ".js"],
modules: ["node_modules"]
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: "ts-loader",
options: {
// appendTsSuffixTo: [/\.s[ac]ss$/]
}
}
]
},
mode: "production"
}