Closed dtmzr closed 3 years ago
Had the same issue, found a related issue on the webpack repo: https://github.com/webpack/webpack/issues/6985
Also see: https://webpack.js.org/configuration/output/#output-jsonpfunction
output.jsonpFunction
string
Only used when target is web, which uses JSONP for loading on-demand chunks.
A JSONP function name used to asynchronously load chunks or join multiple initial chunks (CommonsChunkPlugin, AggressiveSplittingPlugin).
This needs to be changed if multiple webpack runtimes (from different compilation) are used on the same webpage.
If using the output.library option, the library name is automatically appended.
So change output.library
in webpack config to any string (will be appended to jsonpfunction to avoid conflict).
@JanGunzenhauser thank you! it solved my problem
Update* @JanGunzenhauser
Also see: https://webpack.js.org/configuration/output/#output-jsonpfunction
This is updated after release of webpack5 in their official documentation. https://webpack.js.org/configuration/output/#outputchunkloadingglobal in webpack5 documentation this is same as jsonpFunction. Refer: https://webpack.js.org/blog/2020-10-10-webpack-5-release/#changes-to-the-structure
Thanks all, output.jsonpFunction is really helpful...
Can we close this one, @dtmzr?
@jonnitto feel free - changing the jsonp name worked as far as I remember, sorry for not replying in here - at that time I had lost total control over my notifications.
Description
When I use webpack 4.12.1 with the SplitChunksPlugin I get a js error (only in the backend!).
Backtracking it brings me to these lines
I guess the error is related to window["webpackJsonp"]. I didn't have time to investigate more but will do asap.
Steps to Reproduce
Expected behavior
Shouldn't throw errors and may bind iFrame properties to own window? I guess this could make custom js mess up the backend too.
Actual behavior
Throws error and breaks interaction with UI in backend. This error does not appear when I comment out the optimization.splitChunks.cacheGroups.vendor and bundle all js into a single output. Currently the main bundle is in the body and the vendor in the head. Played around with moving them but that didn't change the behavior. Used the same code base with Webpack 2.7.0 without this behavior.
Affected Versions
Neos: 4.0.6 Neos-UI: 1.1.1
Flow: 5.0.5
Webpack config