forked from Gnafu/MapStore2-C040
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prod-webpack.config.js
56 lines (52 loc) · 1.72 KB
/
prod-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
const path = require("path");
const extractThemesPlugin = require('./MapStore2/build/themes.js').extractThemesPlugin;
const HtmlWebpackPlugin = require('html-webpack-plugin');
const paths = {
base: __dirname,
dist: path.join(__dirname, "dist"),
framework: path.join(__dirname, "MapStore2", "web", "client"),
code: [path.join(__dirname, "js"), path.join(__dirname, "MapStore2", "web", "client")]
};
const config = require('./MapStore2/build/buildConfig')(
{
'MapStore2-C040': path.join(__dirname, "js", "app"),
"embedded": path.join(__dirname, "js", "embedded"),
"ms2-api": path.join(__dirname, "js", "api"),
"llpp": path.join(__dirname, "js", "llpp")
},
{
"themes/comge": path.join(__dirname, "assets", "themes", "comge", "theme.less")
},
paths,
extractThemesPlugin,
true,
"/MapStore2/dist/", // the old value was "dist/" ?
null,
[
new HtmlWebpackPlugin({
template: path.join(paths.base, 'indexTemplate.html'),
chunks: ['MapStore2-C040'],
inject: true,
hash: true
}),
new HtmlWebpackPlugin({
template: path.join(paths.base, 'embeddedTemplate.html'),
chunks: ['embedded'],
inject: true,
hash: true,
filename: 'embedded.html'
}),
new HtmlWebpackPlugin({
template: path.join(paths.base, 'apiTemplate.html'),
chunks: ['ms2-api'],
inject: 'head',
hash: true,
filename: 'api.html'
})
],
{
'@mapstore': path.resolve(__dirname, 'MapStore2/web/client'),
'@js': path.resolve(__dirname, 'js')
}
);
module.exports = config;