Open tobiu opened 1 week ago
steps to reproduce:
i stepped more through the build logic and the new trouble-maker obviously is the LivePreview component.
it makes sense: we have a string, which can change in any possible way at run-time, which then gets parsed (replacing static with dynamic imports) and then converted into JS.
IF the previews were readOnly, we could probably monkey-patch it (magic comments to ignore our custom logic and telling build-tools exactly what to import instead)
otherwise, the LivePreview is limited to the dev mode.
This still does not justify though that Webpack sneaks in singletons more than once.
i did not see it before using our
LivePreview
which dynamically imports apps which can dynamically import other modules.sadly this is a "game over" for our dist/development & dist/production env.
imho we do not need harmony these days anyway => browsers and node are capable of using real JS modules.
@sokra