forked from geosolutions-it/MapStore2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprod-webpack.config.js
50 lines (47 loc) · 1.56 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
const path = require("path");
const assign = require('object-assign');
const themeEntries = require('./themes.js').themeEntries;
const extractThemesPlugin = require('./themes.js').extractThemesPlugin;
const HtmlWebpackPlugin = require('html-webpack-plugin');
const paths = {
base: __dirname,
dist: path.join(__dirname, "web", "client", "dist"),
framework: path.join(__dirname, "web", "client"),
code: path.join(__dirname, "web", "client")
};
module.exports = require('./buildConfig')(
assign({
"mapstore2": path.join(__dirname, "web", "client", "product", "app"),
"embedded": path.join(__dirname, "web", "client", "product", "embedded"),
"ms2-api": path.join(__dirname, "web", "client", "product", "api")
},
require('./examples')
),
themeEntries,
paths,
extractThemesPlugin,
true,
"/mapstore/dist/",
undefined,
[
new HtmlWebpackPlugin({
template: path.join(paths.framework, 'indexTemplate.html'),
chunks: ['mapstore2'],
inject: true,
hash: true
}),
new HtmlWebpackPlugin({
template: path.join(paths.framework, 'embeddedTemplate.html'),
chunks: ['embedded'],
inject: true,
hash: true,
filename: 'embedded.html'
}), new HtmlWebpackPlugin({
template: path.join(paths.framework, 'apiTemplate.html'),
chunks: ['ms2-api'],
inject: 'head',
hash: true,
filename: 'api.html'
})
]
);