fix(libConfig): import default in CJS build #35
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
How to test
@nextcloud/vue
npm test
(or better justnpx jest CalDavSetting
for a single test)[Vue warn]: Failed to mount component: template or render function not defined
A problem
By default,
As a result, when a CJS lib built with this config is used with such tooling, external dependencies are imported as an object with a default property.
Proposal
interop: auto
adds a hack with__esModule
to help tools interpret it.Alternative
Formally
__esModule
is a hack. Supported by all the tolling but still.interop: compat
also works checking how the module was importedSee: https://rollupjs.org/configuration-options/#output-interop
P.S.
I'm not sure it fixes all the issues with the new CJS built. Checking...