Closed MichaelDeBoey closed 2 years ago
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?
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 https://github.com/remorses/esbuild-plugins/pull/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
Got it, that makes sense. Thanks for the PR!
Closes #50