Skip to content

Commit

Permalink
geosolutions-it#3989: fixed the broken examples (geosolutions-it#4003)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarto authored and offtherailz committed Aug 9, 2019
1 parent 959e5ae commit 886ddb3
Show file tree
Hide file tree
Showing 13 changed files with 401 additions and 370 deletions.
20 changes: 16 additions & 4 deletions build/examples-webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
var webpackConfig = require('./webpack.config.js');
var assign = require('object-assign');
const themeEntries = require('./themes.js').themeEntries;
const extractThemesPlugin = require('./themes.js').extractThemesPlugin;

assign(webpackConfig.entry, require('./examples.js'));
const path = require("path");

module.exports = webpackConfig;
module.exports = require('./buildConfig')(
require('./examples.js'),
themeEntries,
{
base: path.join(__dirname, ".."),
dist: path.join(__dirname, "..", "web", "client", "dist"),
framework: path.join(__dirname, "..", "web", "client"),
code: path.join(__dirname, "..", "web", "client")
},
extractThemesPlugin,
false,
"/dist/"
);
8 changes: 7 additions & 1 deletion build/prod-webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const assign = require('object-assign');
const themeEntries = require('./themes.js').themeEntries;
const extractThemesPlugin = require('./themes.js').extractThemesPlugin;
const HtmlWebpackPlugin = require('html-webpack-plugin');
const DynamicPublicPathPlugin = require("dynamic-public-path-webpack-plugin");

const paths = {
base: path.join(__dirname, ".."),
Expand Down Expand Up @@ -46,5 +47,10 @@ module.exports = require('./buildConfig')(
hash: true,
filename: 'api.html'
})
]
].concat(Object.keys(require('./examples')).map(function(example) {
return new DynamicPublicPathPlugin({
externalGlobal: 'window.mapStoreDist',
chunkName: example
});
}))
);
Loading

0 comments on commit 886ddb3

Please sign in to comment.