single-spa / standalone-single-spa-webpack-plugin

A webpack plugin for running microfrontends in standalone mode.
MIT License
41 stars 7 forks source link

publicPath added twice on mainScript #26

Open karoldeland opened 1 week ago

karoldeland commented 1 week ago

When defining the publicPath option, we end with our module imported as /publicPath/publicPath/module.js.

The problem comes from this line : let mainScriptSrc = (publicPath || "/") + mainScript.attributes.src;

mainScript.attributes.src already contains the publicPath prefix.

Maybe it was not the case with previous version of HtmlWebpackPlugin or other?