Mercurial > code > home > repos > streamed-graph
annotate webpack.config.js @ 32:db0e9cbf52e5
WIP converting to the package system that i found can work
author | drewp@bigasterisk.com |
---|---|
date | Tue, 24 Dec 2019 18:37:03 -0800 |
parents | 86270a59ae7b |
children |
rev | line source |
---|---|
20
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
1 const path = require("path"); |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
2 |
32
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
3 const thisPackage = path.basename(__dirname) |
20
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
4 module.exports = { |
32
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
5 entry: ["./src/index.ts"], |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
6 output: { |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
7 library: thisPackage, |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
8 filename: "bundle.js", |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
9 path: path.resolve(__dirname, "build"), |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
10 publicPath: "/build/" |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
11 }, |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
12 module: { |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
13 rules: [ |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
14 { |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
15 test: /\.ts$/, |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
16 loader: require.resolve("ts-loader") |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
17 }, |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
18 { test: /\.css$/i, use: ["file-loader"] } |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
19 ] |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
20 }, |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
21 devtool: "source-map", |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
22 resolve: { |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
23 extensions: [".ts", ".js"], |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
24 modules: ["node_modules"] |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
25 }, |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
26 watchOptions: { |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
27 ignored: /node_modules/, |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
28 poll: 200 |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
29 }, |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
30 devServer: { |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
31 port: 8082, |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
32 publicPath: "/build/", |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
33 contentBase: __dirname |
db0e9cbf52e5
WIP converting to the package system that i found can work
drewp@bigasterisk.com
parents:
25
diff
changeset
|
34 } |
20
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
35 }; |