Support querystrings in entrypoints and pass to plugins #8687
Unanswered
goosewobbler
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Working on an Electron project, looking to make Parcel use a single EJS entrypoint to compile (and serve) multiple HTML files. The current solution relies on specifying, e.g. for dev
parcel serve app/one.dev.html app/two.dev.html app/three.dev.html
These files are very similar, would benefit from templating, so I created an EJS template and was considering to use querystrings, updating the EJS transformer to pass them into the EJS compilation, e.g.
parcel serve app/dev.ejs?window=one app/dev.ejs?window=two app/dev.ejs?window=three
sarscode/parcel-transformer-ejs#11
However specifying querystrings on parcel entrypoints just seems to break compilation: #8543
https://github.com/parcel-bundler/parcel/blob/v2/packages/core/core/src/requests/EntryRequest.js#L180
Is there another way to do this? The only other way I thought of was to compile the the HTML files with EJS before pointing Parcel at them to serve / bundle, which seems like an unnecessary extra step.
Would be nice if Parcel would strip querystrings from entrypoints and pass them to transformers.
Beta Was this translation helpful? Give feedback.
All reactions