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

Minor change to improve support for Parcel/SWC #54

Merged
merged 1 commit into from May 15, 2022

Conversation

mindplay-dk
Copy link
Contributor

Parcel is currently unable to perform static analysis on the in operator applied to process.env, for the purposes of bundling the module. (Parcel is a front-end to SWC, so this most likely affects SWC as well.)

Would you mind making this very minor change?

It should work exactly the same - enabled is true by default, so FORCE_COLOR only has an effect when set to exactly 0.

It's a bit simpler and avoids mutations, so maybe a bit easier to read anyhow. 🙂

Parcel is currently [unable to perform static analysis](parcel-bundler/parcel#7904) on the `in` operator applied to `process.env`, for the purposes of bundling the module. (Parcel is a front-end to SWC, so this most likely affects SWC as well.)

Would you mind making this very minor change?

It should work exactly the same - `enabled` is `true` by default, so `FORCE_COLOR` only has an effect when set to exactly `0`.

It's a bit simpler and avoids mutations, so maybe a bit easier to read anyhow. 🙂
mindplay-dk added a commit to mindplay-dk/inertion that referenced this pull request Apr 12, 2022
@jonschlinkert
Copy link
Collaborator

thank you, and sorry for taking so long to merge!

@jonschlinkert jonschlinkert merged commit c765510 into doowb:master May 15, 2022
@jonschlinkert
Copy link
Collaborator

published and released as 4.1.2. thanks again @mindplay-dk!

@mindplay-dk
Copy link
Contributor Author

Ah, well, thanks - but they actually fixed the issue, which only surfaced another issue.

Besides, it doesn't look like the generated the ANSI color codes actually work properly in browsers to begin with: #53.

With no color library actually supporting this, it looks like I may be the only person who needs this or cares - probably most people would just build a dedicated HTML front-end for whatever they're building instead, so maybe that's what I have to do.

@doowb
Copy link
Owner

doowb commented May 19, 2022

Besides, it doesn't look like the generated the ANSI color codes actually work properly in browsers to begin with

I commented on that issue. Sorry for the delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants