Mercurial > code > home > repos > streamed-graph
annotate webpack.config.js @ 22:e90d9021c6a0
add back s-g code; this breaks the build a little. WIP
author | drewp@bigasterisk.com |
---|---|
date | Fri, 13 Dec 2019 01:39:29 -0800 |
parents | 9ec3cbc8791a |
children | 09080dc809ed |
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', |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
9 path: path.resolve(__dirname, 'build') |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
10 }, |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
11 module: { |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
12 rules: [ |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
13 { |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
14 test: /\.ts$/, |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
15 loader: require.resolve('ts-loader'), |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
16 options: PnpWebpackPlugin.tsLoaderOptions({ |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
17 // ... regular options go there ... |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
18 }) |
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 { 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
|
21 ] |
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 devtool: 'source-map', |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
24 resolve: { |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
25 plugins: [ |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
26 PnpWebpackPlugin, |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
27 ], |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
28 }, |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
29 resolveLoader: { |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
30 plugins: [ |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
31 PnpWebpackPlugin.moduleLoader(module), |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
32 ], |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
33 }, |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
34 watchOptions: { |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
35 ignored: /node_modules/, |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
36 poll: 200 |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
37 } |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
38 }; |