Is a multi sources, multi entries setup possible? (mono repostory)
See original GitHub issueI’ve been trying to use Parcel 2 in the context of the Gutenberg repository (WordPress’s new Block Editor). Our repository is basically a regular mono-repository with multiple packages (packages folder).
The specificity maybe is that each package can have both a JavaScript entry and one or several SCSS entries. The JavaScript entry can have multiple targets (CommonJS and ESM) while the style entry can have just one target (regular CSS)
My starting point was this PR introducing mono-repository support https://github.com/parcel-bundler/parcel/pull/3583
I tried diving into the docs, I found that it may be possible to define source
as an array in the package.json
of each package but I haven’t managed to make it work properly (empty output when I try to build) and I’ve not been able to figure out a way to define my targets properly (the CSS ones). So I was wondering if a setup like this is even possible?
Thank you
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:12 (5 by maintainers)
This was implemented in the meantime: https://v2.parceljs.org/features/targets/#package.json%23targets.*.source
@youknowriad @devongovett Was there a resolution to this?
If I’m understanding this correctly, it seems parcel can’t take 2 entry points and create, for each, a .js bundle and a .css bundle. This seems a bit odd when parcel has support for multiple targets as a first-class feature.
Apologies if I have misunderstood.