annotate webpack-dev.config.ts @ 4:a668a774b162

back up, slowly turn on code again until ts breaks
author drewp@bigasterisk.com
date Wed, 04 Dec 2019 00:23:28 -0800
parents a7ba8627a7b6
children daf08d794660
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
drewp@localhost
parents:
diff changeset
1 import path from "path";
drewp@localhost
parents:
diff changeset
2 import webpack from 'webpack';
drewp@localhost
parents:
diff changeset
3
drewp@localhost
parents:
diff changeset
4 const config: webpack.Configuration = {
drewp@localhost
parents:
diff changeset
5 mode: "development",
drewp@localhost
parents:
diff changeset
6 entry: [
drewp@localhost
parents:
diff changeset
7 './src/streamed-graph.ts',
4
a668a774b162 back up, slowly turn on code again until ts breaks
drewp@bigasterisk.com
parents: 3
diff changeset
8 // './src/streamed_graph_client.ts',
3
a7ba8627a7b6 still trying to make imports work. add other files too
drewp@bigasterisk.com
parents: 0
diff changeset
9
0
drewp@localhost
parents:
diff changeset
10 './src/streamed-graph.css' // doesn't emit anything
drewp@localhost
parents:
diff changeset
11 ],
drewp@localhost
parents:
diff changeset
12 output: {
drewp@localhost
parents:
diff changeset
13 filename: 'streamed-graph.bundle.js',
drewp@localhost
parents:
diff changeset
14 path: path.resolve(__dirname, 'build')
drewp@localhost
parents:
diff changeset
15 },
drewp@localhost
parents:
diff changeset
16 resolve: {
drewp@localhost
parents:
diff changeset
17 alias: {
drewp@localhost
parents:
diff changeset
18 'webpack-plugin-serve/client': './node_modules/webpack-plugin-serve/client.js',
drewp@localhost
parents:
diff changeset
19 },
drewp@localhost
parents:
diff changeset
20 },
drewp@localhost
parents:
diff changeset
21 module: {
drewp@localhost
parents:
diff changeset
22 rules: [
drewp@localhost
parents:
diff changeset
23 { test: /\.ts$/, use: 'ts-loader', exclude: /node_modules/ },
drewp@localhost
parents:
diff changeset
24 { test: /\.css$/i, use: ['file-loader'] },
drewp@localhost
parents:
diff changeset
25 ],
drewp@localhost
parents:
diff changeset
26
drewp@localhost
parents:
diff changeset
27 },
drewp@localhost
parents:
diff changeset
28 devServer: {
drewp@localhost
parents:
diff changeset
29 port: 8082,
drewp@localhost
parents:
diff changeset
30 hot: false,
drewp@localhost
parents:
diff changeset
31 liveReload: true, // doesn't work
drewp@localhost
parents:
diff changeset
32 overlay: true,
drewp@localhost
parents:
diff changeset
33 watchContentBase: true,
drewp@localhost
parents:
diff changeset
34 // proxy: {
drewp@localhost
parents:
diff changeset
35 // '/rdf': {
drewp@localhost
parents:
diff changeset
36 // target: 'https://bigasterisk.com/',
drewp@localhost
parents:
diff changeset
37 // //pathRewrite: {'^/api' : ''}
drewp@localhost
parents:
diff changeset
38 // }
drewp@localhost
parents:
diff changeset
39 // },
drewp@localhost
parents:
diff changeset
40 }
drewp@localhost
parents:
diff changeset
41 };
drewp@localhost
parents:
diff changeset
42
drewp@localhost
parents:
diff changeset
43 export default config;