I have the following project structure
/
-- dest/
-- public/
---- widget.html
-- src/
---- runner.ts
---- runner.scss
---- widget/
------ components/
-------- ComponentA.vue
-------- ComponentB.vue
------ App.vue
------ widget.ts
my goal is to:
- bundle the Vue app under
src/widget
->dest/widget
usingpublic/widget.html as the
entry` - bundle
src/runner.ts
->dest/runner.js
- bundle
src/runner.scss
->dest/runner.css
I will load runner.js
on my site ( header of footer ). runner.js
will create an iframe and load dest/widget.html
into the iframe source, which will in turn load the app inside the iframe. runner.js
will also load runner.css
and inject it into the page ( dynamically, outside of the bundling flow )
problems:
- since Parcel is forcing file hashes, i do not understand how
runner.ts
can reference thewidget.html
if the hash keeps changing - can i do this entire set of requirement in a single bundler / config?
I understand these are rather unusual requirement but this is what the app needs to do and this is what needs to happen, I just need help to find the solution to achieve this in the right way without hacking or doing crazy stuff :)