Mercurial > code > home > repos > streamed-graph
annotate webpack.config.js @ 24:09080dc809ed
webpack config might finally work
author | drewp@bigasterisk.com |
---|---|
date | Fri, 13 Dec 2019 23:05:12 -0800 |
parents | 9ec3cbc8791a |
children | 86270a59ae7b |
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: { |
24 | 25 extensions: [".ts", ".js"], |
20
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
26 plugins: [ |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
27 PnpWebpackPlugin, |
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 }, |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
30 resolveLoader: { |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
31 plugins: [ |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
32 PnpWebpackPlugin.moduleLoader(module), |
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 }, |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
35 watchOptions: { |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
36 ignored: /node_modules/, |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
37 poll: 200 |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
38 } |
9ec3cbc8791a
build is running, but no tests, and lots of code is disabled
drewp@bigasterisk.com
parents:
diff
changeset
|
39 }; |