-
Notifications
You must be signed in to change notification settings - Fork 499
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
fix: webpack bundling compatibility #757
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
// webpack resolves json5 with module field out of the box which lead to this usage | ||
// @see https://github.com/node-config/node-config/issues/755 | ||
// @see https://github.com/json5/json5/issues/240 | ||
const JSON5 = JSON5Module.default || JSON5Module; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which object is the actual parser, JSON5Module.default
or JSON5Module
? Just wondering if you know something about JSON5Module
that in some cases would have a default
element and in other cases be the parser itself.
update: never mind - I read through json5/json5#240 and can see it may differ based on different loaders.
This looks good - I guess webpack can't know to bundle if modules are dynamically loaded. Since we've made the jump to require json5 this looks like the right way to load it. |
Merging @cbazureau webpack fix |
Any ETA when this will be included in the next release? |
Thank you for the reminder. A new branch and release has been created, and published to NPM. Thank you for your contribution! |
I see the new release but it's not in NPM yet |
Thank you for letting me know. I thought it was published, but the NPM multi-factor auth fooled me. It's published now. |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [config](http://github.com/node-config/node-config.git) ([source](https://togithub.com/node-config/node-config)) | [`3.3.10` -> `3.3.11`](https://renovatebot.com/diffs/npm/config/3.3.10/3.3.11) | [![age](https://developer.mend.io/api/mc/badges/age/npm/config/3.3.11?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/config/3.3.11?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/config/3.3.10/3.3.11?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/config/3.3.10/3.3.11?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>node-config/node-config (config)</summary> ### [`v3.3.11`](https://togithub.com/node-config/node-config/releases/tag/v3.3.11) [Compare Source](https://togithub.com/node-config/node-config/compare/v3.3.10...v3.3.11) #### What's Changed - fix: webpack bundling compatibility by [@​cbazureau](https://togithub.com/cbazureau) in [https://github.com/node-config/node-config/pull/757](https://togithub.com/node-config/node-config/pull/757) #### New Contributors - [@​cbazureau](https://togithub.com/cbazureau) made their first contribution in [https://github.com/node-config/node-config/pull/757](https://togithub.com/node-config/node-config/pull/757) **Full Changelog**: node-config/node-config@v3.3.10...v3.3.11 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/tomacheese/cmcutter). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNzAuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE3MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
fix #755