diff webpack-dev.config.ts @ 0:a9bc14e22e36

start
author drewp@localhost
date Tue, 03 Dec 2019 21:27:52 -0800
parents
children a7ba8627a7b6
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/webpack-dev.config.ts	Tue Dec 03 21:27:52 2019 -0800
@@ -0,0 +1,41 @@
+import path from "path";
+import webpack from 'webpack';
+
+const config: webpack.Configuration = {
+    mode: "development",
+    entry: [
+        './src/streamed-graph.ts',
+        './src/streamed-graph.css'   // doesn't emit anything
+    ],
+    output: {
+        filename: 'streamed-graph.bundle.js',
+        path: path.resolve(__dirname, 'build')
+    },
+    resolve: {
+        alias: {
+            'webpack-plugin-serve/client': './node_modules/webpack-plugin-serve/client.js',
+        },
+    },
+    module: {
+        rules: [
+            { test: /\.ts$/, use: 'ts-loader', exclude: /node_modules/ },
+            { test: /\.css$/i, use: ['file-loader'] },
+        ],
+
+    },
+    devServer: {
+        port: 8082,
+        hot: false,
+        liveReload: true, // doesn't work
+        overlay: true,
+        watchContentBase: true,
+        // proxy: {
+        //     '/rdf': {
+        //         target: 'https://bigasterisk.com/',
+        //         //pathRewrite: {'^/api' : ''}  
+        //     }
+        // },
+    }
+};
+
+export default config;
\ No newline at end of file