-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathwebpack.config.js
70 lines (66 loc) · 1.71 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
const path = require('path');
const webpack = require('webpack');
const appRules = require('./config/rules-hpccloud.js');
const linterRules = require('./config/rules-linter.js');
const pvwRules = require('./config/rules-pvw.js');
const visualizerRules = require('./config/rules-visualizer.js');
const vtkjsRules = require('./config/rules-vtkjs.js');
const wslinkRules = require('./config/rules-wslink.js');
const simputRules = require('./config/rules-simput.js');
const entry = path.join(__dirname, 'src/app.js');
const plugins = [];
plugins.push(
new webpack.DefinePlugin({
KARMA_TEST_RUNNER: JSON.stringify(false),
})
);
module.exports = {
plugins,
entry,
output: {
path: path.join(__dirname, './dist'),
filename: 'HPCCloud.js',
},
module: {
rules: [
{
test: entry,
loader: 'expose-loader?HPCCloud',
},
].concat(
linterRules,
appRules,
pvwRules,
visualizerRules,
vtkjsRules,
wslinkRules,
simputRules
),
},
resolve: {
alias: {
'PVWStyle/ReactProperties/PropertyPanel.mcss': path.resolve(
'./node_modules/simput/style/PropertyPanel.mcss'
),
PVWStyle: path.join(__dirname, './node_modules/paraviewweb/style'),
VisualizerStyle: path.join(
__dirname,
'./node_modules/pvw-visualizer/style'
),
SimputStyle: path.resolve('./node_modules/simput/style'),
HPCCloudStyle: path.resolve('./style'),
workflows: path.resolve('./src/workflows'),
},
},
externals: {
Simput: 'Simput',
},
devServer: {
contentBase: './dist/',
port: 9999,
proxy: {
'/api/*': 'http://localhost:8080',
'/static/*': 'http://localhost:8080',
},
},
};