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

fix: expose modules file #51

Merged
merged 1 commit into from
Jul 5, 2022
Merged

fix: expose modules file #51

merged 1 commit into from
Jul 5, 2022

Conversation

MichaelDeBoey
Copy link
Contributor

Closes #50

@FredKSchott
Copy link
Owner

I'm not sure what you mean by "expose modules file", this just appears to move files around in the final output package. Can you explain more about what this change is meant to do?

@MichaelDeBoey
Copy link
Contributor Author

MichaelDeBoey commented Jun 29, 2022

Before this PR, the only entry point was index.js/index.mjs.
By setting preserveModules to true, we can also do import { getModules } from 'rollup-plugin-polyfill-node/modules', which is what's needed for remorses/esbuild-plugins#19

// before
|- dist
    |- types
    |   |- index.d.ts
    |   |- modules.d.ts
    |   |- polyfills.d.ts
    |- index.js
    |- index.mjs
// after
|- dist
    |- es
    |   |- index.js
    |   |- modules.js
    |   |- polyfills.js
    |- index.d.ts
    |- index.js
    |- modules.d.ts
    |- modules.js
    |- polyfills.d.ts
    |- polyfills.js

@FredKSchott
Copy link
Owner

Got it, that makes sense. Thanks for the PR!

@FredKSchott FredKSchott merged commit 7e90b69 into FredKSchott:main Jul 5, 2022
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.

Expose modules file
2 participants