-
-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathwebpack.config.js
44 lines (40 loc) · 994 Bytes
/
webpack.config.js
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
44
const path = require('path');
const linterRules = require('./config/wp5/rules-linter.js');
const pvwRules = require('./config/wp5/rules-pvw.js');
const vtkRules = require('./config/wp5/rules-vtk.js');
const wslinkRules = require('./config/wp5/rules-wslink.js');
const entry = path.join(__dirname, './src/index.js');
const outputPath = path.join(__dirname, './dist');
const styles = path.join(__dirname, './style');
const plugins = [];
module.exports = {
plugins,
entry,
output: {
path: outputPath,
filename: 'ParaViewWeb.js',
libraryTarget: 'umd',
},
module: {
noParse: [/plotly\.js/],
rules: [{
test: entry,
loader: 'expose-loader',
options: {
exposes: ['ParaViewWeb'],
}
}].concat(
pvwRules,
linterRules,
vtkRules,
wslinkRules
),
},
resolve: {
alias: {
paraviewweb: __dirname,
PVWStyle: styles,
},
fallback: { stream: require.resolve('stream-browserify') },
},
};