Split WebPack chunks, but turn off the size hint warning.
authorRobert Sesek <rsesek@bluestatic.org>
Mon, 23 Mar 2020 23:13:39 +0000 (19:13 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Mon, 23 Mar 2020 23:13:39 +0000 (19:13 -0400)
Also update the REAMDE to use the JS-version of the viewer script, so
that typeRoots don't have to be configured by the users.

README.md
src/ustaxviewer.ts
tsconfig.json

index 088b837d56720a3db1fc93bbc488f520c0a753a0..200e3de3cbdc771f721f173a8c5d8bbb7509aad7 100644 (file)
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@ the "Amount You Owe", for example, which [yields this massive graph](doc/f1040-a
 
 See the [ustaxlib] repository for how to get started modeling taxes. To run the viewer, simply do:
 
-    npx ustaxviewer-ts taxfile.ts
+    npx ustaxviewer taxfile.ts
 
 Note that `taxfile.ts` should have a default export of the TaxReturn object to be rendered.
 
index 6317df315abef7027f7b77d90d9b95f7e9dbc27d..999bc28b30170bb738dc6129e9d2af814b18caa9 100755 (executable)
@@ -78,6 +78,22 @@ const compiler = webpack({
     ]
   },
 
+  output: {
+    filename: '[name].bundle.js',
+    chunkFilename: '[name].bundle.js',
+  },
+
+  optimization: {
+    minimize: false,
+    splitChunks: {
+      chunks: 'all',
+    }
+  },
+
+  performance: {
+    hints: isTypescript
+  },
+
   devServer: {
     contentBase: [
       PUBLIC,
index d97ddd95e3c5b937adb4763719155151a953662a..bdabc33dcfb3eae2093e2b58849629207a2b56bb 100644 (file)
@@ -20,7 +20,7 @@
     "demos"
   ],
   "exclude": [
-    "node_modules/",
-    "../ustaxlib"
+    "./node_modules/",
+    "./dist/"
   ]
 }