-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathwebpack.config.dev.cjs
43 lines (39 loc) · 1.13 KB
/
webpack.config.dev.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// dev
const LiveReloadPlugin = require('webpack-livereload-plugin')
module.exports = {
mode: 'development',
output: {
filename: 'gridviz.js',
library: 'gridviz',
libraryTarget: 'umd',
},
plugins: [new LiveReloadPlugin()],
watch: true,
devtool: 'inline-source-map',
experiments: {
asyncWebAssembly: true,
//syncWebAssembly: true
},
// webpack.config.js
// other config options
module: {
rules: [
{
test: /\.worker\.js$/,
use: { loader: 'worker-loader' },
},
// other rules
],
},
//this is to test data from a local folder, exposed via a local server. Replace directory and port on request.
devServer: {
static: {
//directory: '/home/juju/workspace/',
//directory: '/home/juju/workspace/tiled-grid-france-filosofi/out/csv/',
//directory: '/home/juju/Bureau/geodata/IFS/',
directory: '/home/juju/gisco/grid_pop_c2021/',
},
port: 1234,
headers: { 'Access-Control-Allow-Origin': '*' },
},
}