changeset 25:86270a59ae7b

even better configs. ts maps, devserver mode.
author drewp@bigasterisk.com
date Fri, 13 Dec 2019 23:52:23 -0800
parents 09080dc809ed
children 7fe46400f04b
files package.json tasks.py tsconfig.json webpack.config.js
diffstat 4 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/package.json	Fri Dec 13 23:05:12 2019 -0800
+++ b/package.json	Fri Dec 13 23:52:23 2019 -0800
@@ -50,7 +50,7 @@
     "compile": "tsc",
     "webpack-build": "webpack-cli --config webpack.config.js --mode production",
     "webpack-build-forever": "webpack-cli --config webpack.config.js --mode production --watch",
-    "webpack-dev-server": "webpack-dev-server --config webpack.config.js --mode development --port 8082 --watch ",
+    "webpack-dev-server": "webpack-dev-server --config webpack.config.js --mode development",
     "test": "jest --env=node --colors --resolver=jest-pnp-resolver --coverage test"
   }
 }
--- a/tasks.py	Fri Dec 13 23:05:12 2019 -0800
+++ b/tasks.py	Fri Dec 13 23:52:23 2019 -0800
@@ -20,7 +20,7 @@
     ctx.run(f'node_modules/.bin/webpack-cli --config webpack-test.config.ts')
     ctx.run(f'node_modules/.bin/ts-node node_modules/.bin/jasmine --config=jasmine.json')
 
-# one time:
+# one time per machine:
 # yarn policies set-version v2
 # in vscode, ctrl-p then: ext install ark120202.vscode-typescript-pnp-plugin
 # or see https://next.yarnpkg.com/advanced/pnpify for a compatibility runner.
--- a/tsconfig.json	Fri Dec 13 23:05:12 2019 -0800
+++ b/tsconfig.json	Fri Dec 13 23:52:23 2019 -0800
@@ -23,6 +23,7 @@
         // "noUnusedParameters": true,
          "rootDir": ".",
         // "types": [ "node", "jest" ],
+        "sourceMap": true
     },
     "include": [
         "src/**/*.ts"
--- a/webpack.config.js	Fri Dec 13 23:05:12 2019 -0800
+++ b/webpack.config.js	Fri Dec 13 23:52:23 2019 -0800
@@ -6,7 +6,8 @@
     entry: ['./src/streamed-graph.ts'],
     output: {
         filename: 'streamed-graph.bundle.js',
-        path: path.resolve(__dirname, 'build')
+        path: path.resolve(__dirname, 'build'),
+        publicPath: '/build/'
     },
     module: {
         rules: [
@@ -35,5 +36,10 @@
     watchOptions: {
         ignored: /node_modules/,
         poll: 200
+    },
+    devServer: {
+        port: 8082,
+        publicPath: '/build/',
+        contentBase: __dirname
     }
 };