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
Replace deprecated folder export with pattern export #3896
Conversation
Thank you for your contribution! ❤️You can try out this pull request locally by installing Rollup via
or load it into the REPL: |
Codecov Report
@@ Coverage Diff @@
## master #3896 +/- ##
=======================================
Coverage 97.07% 97.07%
=======================================
Files 187 187
Lines 6538 6538
Branches 1901 1901
=======================================
Hits 6347 6347
Misses 101 101
Partials 90 90 Continue to review full report at Codecov.
|
Hi. I just figured out, that this change broke the possibility to require "rollup/dist/loadConfigFile", that 'others' (in my case "cy-rollup") are using ... don't know if this warants an issue here or over there. But you can't even require loadConfigFile from the plain node repl ... |
@Crenshinibon if you use the explicit |
Yes, probably. But I'm only using 'cy-rollup' which then requires 'loadConfigFile'. Check out the docs regarding subpath patterns: I think you need to export: "./dist/*": "./dist/*.js" Changing this locally brings everything back to normal for me. |
I guess I did not realize this would be a breaking change. I will revert this for now because as I see it, there is no way to allow requires both with and without extension to work with a pattern export. |
I found a pattern that enables both styles of import (with and without extension) as long as you can assume that all files that will be imported from
Would this be an acceptable solution? This won't allow requiring of non-JS files in the |
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Resolves #3890
Description
This follows official Node (14) guidance to prefer a pattern export over a folder export.