The problem here is that after being bundled, the page will now execute the ../katapult-maps-desktop.js script before the ../app-configuration.js script which is not the correct order according to the pre-bundled file. This issue came about when upgrading from rollup@2.79.1 to v3. Also interestingly, this only happens to certain pages. We have multiple pages in our app with similar index.html files as this one but it seems random as to which ones build with an incorrect script order and which ones build correctly. Any help would be appreciated!
Update! While this still does seem like a bug, my workaround was to import app-configuration.js at the top of katapult-maps-desktop.js instead of it being imported using a script tag.
Versions
@web/rollup-plugin-html
: 2.0.1rollup
: 3.29.3Plugin config
Pre-bundled index.html file
Bundled index.html file
Issue
The problem here is that after being bundled, the page will now execute the
../katapult-maps-desktop.js
script before the../app-configuration.js
script which is not the correct order according to the pre-bundled file. This issue came about when upgrading fromrollup@2.79.1
to v3. Also interestingly, this only happens to certain pages. We have multiple pages in our app with similar index.html files as this one but it seems random as to which ones build with an incorrect script order and which ones build correctly. Any help would be appreciated!