Fair warning, I'm not a webpack expert. I usually get by with the most default settings and have never really worked on external libraries like this.
I plowed through some documentation and forums to look at what was going on. I believe the plugins were confused by the inclusion of both a modal-framework and modal-framework.min entry in the production webpack config. In fact webpack was building two nearly identical minified versions of the framework and including both in the dist/ output, and at a glance it seems it has been doing that since the beginning of this repository.
In the context of Summit, my suggestion would be to ship only a non-minified build as part of the modal-framework package, and let Gen2_XIS handle the final bundling and minification for production. In this case then, the modal-framework code won't be double minified. This pull request includes such configuration.
Some libraries out there do ship with minified and non-minified production builds, but those seem to be for compatibility with older style web applications that aren't using webpack or the like to bundle and minify the whole ecosystem into a single JS bundle. IF you have other apps that use modal-framework without bundling, it might be worth the extra few minutes to tweak the webpack.config.prod.js to produce a minified and (truly) non-minified version.
I also removed the manual //# sourceMappingURL in index.js as it appears to be added by the webpack devtool.
Fair warning, I'm not a webpack expert. I usually get by with the most default settings and have never really worked on external libraries like this.
I plowed through some documentation and forums to look at what was going on. I believe the plugins were confused by the inclusion of both a
modal-framework
andmodal-framework.min
entry in the production webpack config. In fact webpack was building two nearly identical minified versions of the framework and including both in thedist/
output, and at a glance it seems it has been doing that since the beginning of this repository.In the context of Summit, my suggestion would be to ship only a non-minified build as part of the
modal-framework
package, and letGen2_XIS
handle the final bundling and minification for production. In this case then, themodal-framework
code won't be double minified. This pull request includes such configuration.Some libraries out there do ship with minified and non-minified production builds, but those seem to be for compatibility with older style web applications that aren't using webpack or the like to bundle and minify the whole ecosystem into a single JS bundle. IF you have other apps that use
modal-framework
without bundling, it might be worth the extra few minutes to tweak thewebpack.config.prod.js
to produce a minified and (truly) non-minified version.I also removed the manual
//# sourceMappingURL
inindex.js
as it appears to be added by the webpack devtool.