Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipeline should bundle all parts of generated with the same type instead of only the last #1389

Open
DeMoorJasper opened this issue May 18, 2018 · 0 comments

Comments

@DeMoorJasper
Copy link
Member

DeMoorJasper commented May 18, 2018

🐛 bug report

The asset pipeline drops the first JS output from generated if a second one is also in the generated Array.
This mainly occurs when having an asset that has both css and js, as in hmr mode css adds a js file to the generated array

🎛 Configuration (.babelrc, package.json, cli command)

Zero Config, using parcel-plugin-svelte

🤔 Expected Behavior

Should add both scripts to the bundle

😯 Current Behavior

Adds the latest script to the bundle

💁 Possible Solution

Create a seperate HMR bundle that gets added to the html in a seperate script tag that replaces scripts, css and reloads html. Instead of bundling inside asset bundles.

Or add the ability to add options to the generated assets, to prevent css from creating hmr code. Or something similar to addUrlDependency includedInParent

🔦 Context

DeMoorJasper/parcel-plugin-svelte#15

💻 Code Sample

DeMoorJasper/parcel-plugin-svelte#15

🌍 Your Environment

Software Version(s)
Parcel 1.8.1
Node v10
npm/Yarn latest
Operating System OS X High Sierra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant