Mercurial > code > home > repos > streamed-graph
annotate webpack.config.js @ 27:e0f5da648199
fix getter, startup expanded state, better display before 1st data (but that one might not work)
author | drewp@bigasterisk.com |
---|---|
date | Fri, 13 Dec 2019 23:53:56 -0800 |
parents | 86270a59ae7b |
children | 45ed53428e74 db0e9cbf52e5 |
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 const webpack = require('webpack'); |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
3 const PnpWebpackPlugin = require('pnp-webpack-plugin'); |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
4 |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
5 module.exports = { |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
6 entry: ['./src/streamed-graph.ts'], |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
7 output: { |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
8 filename: 'streamed-graph.bundle.js', |
25
86270a59ae7b
even better configs. ts maps, devserver mode.
drewp@bigasterisk.com
parents:
24
diff
changeset
|
9 path: path.resolve(__dirname, 'build'), |
86270a59ae7b
even better configs. ts maps, devserver mode.
drewp@bigasterisk.com
parents:
24
diff
changeset
|
10 publicPath: '/build/' |
20
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
11 }, |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
12 module: { |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
13 rules: [ |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
14 { |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
15 test: /\.ts$/, |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
16 loader: require.resolve('ts-loader'), |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
17 options: PnpWebpackPlugin.tsLoaderOptions({ |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
18 // ... regular options go there ... |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
19 }) |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
20 }, |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
21 { test: /\.css$/i, use: ['file-loader'] }, |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
22 ] |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
23 }, |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
24 devtool: 'source-map', |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
25 resolve: { |
24 | 26 extensions: [".ts", ".js"], |
20
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
27 plugins: [ |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
28 PnpWebpackPlugin, |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
29 ], |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
30 }, |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
31 resolveLoader: { |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
32 plugins: [ |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
33 PnpWebpackPlugin.moduleLoader(module), |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
34 ], |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
35 }, |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
36 watchOptions: { |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
37 ignored: /node_modules/, |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
38 poll: 200 |
25
86270a59ae7b
even better configs. ts maps, devserver mode.
drewp@bigasterisk.com
parents:
24
diff
changeset
|
39 }, |
86270a59ae7b
even better configs. ts maps, devserver mode.
drewp@bigasterisk.com
parents:
24
diff
changeset
|
40 devServer: { |
86270a59ae7b
even better configs. ts maps, devserver mode.
drewp@bigasterisk.com
parents:
24
diff
changeset
|
41 port: 8082, |
86270a59ae7b
even better configs. ts maps, devserver mode.
drewp@bigasterisk.com
parents:
24
diff
changeset
|
42 publicPath: '/build/', |
86270a59ae7b
even better configs. ts maps, devserver mode.
drewp@bigasterisk.com
parents:
24
diff
changeset
|
43 contentBase: __dirname |
20
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
44 } |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
45 }; |