question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is a multi sources, multi entries setup possible? (mono repostory)

See original GitHub issue

I’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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mischniccommented, Oct 5, 2021
0reactions
bhallsteincommented, Oct 5, 2021

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

From a Single Repo, to Multi-Repos, to Monorepo, to Multi ...
The monorepo is a single repo that hosts the code for multiple projects. Since it hosts different packages together, we can version control ......
Read more >
Monorepo vs Multi-Repo: Pros and Cons of Code Repository ...
There are two main strategies for hosting and managing code through Git: monorepo vs multi-repo. Both approaches have their pros and cons.
Read more >
A Guide to Monorepos for Front-end Code - Toptal
A monorepository is a code management and architectural concept whereby you keep all your isolated bits of code in one super repository instead...
Read more >
Setup monorepo rather than multi repo - Hardik Modi
In this post, will evaluate both pros and cons of monorepo and at last, we will set up one simple monorepo. I had...
Read more >
How to Choose between Mono-Repo and Poly-Repo
For poly-repo, you may need to open multiple terminals for each repo and start the components separately. The tool or framework used for ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found