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
Drop support for Node.js < 12 #4164
Comments
I'm for it |
So am I, see also #4123 (review) For me it is more a question of "when". So this obviously needs a major release, the question is just what else to put in there. I actually wanted to do two things before the next major release (and wanted to do so for a year now):
But while I have finally started work on the first one and have a concept for the second one, obviously this was not completed in the last year. So maybe we should decouple them (unless I accidentally make a lot of progress in the near future). But I collected a long laundry list of things for the next major release, and we should at least tackle the low-hanging fruit here: https://github.com/rollup/rollup/projects/3 My suggestion would be to handle this like the 2.0 release:
I would be really happy if we could do this in parallel and also rather soon. Also, If you have other ideas that are sufficiently easy to add (e.g. changed defaults), please add them to the project and possibly as issues or PRs. |
If we're talking wish-lists I would love it if RollupJS could converge on URLs as the primary internal specifier mechanism to match Node.js, Deno and web. |
That could mean we break a lot of plugins if ids are suddenly urls, especially custom ad-hoc plugins. That is my primary fear which could really break Rollup's neck for dubious benefits. |
could we maybe with this even switch the codebase to esm and drop .ts extension that would be a dream. that does not hurt typescript support at all but makes the project directly useable. and it could finaly share the same module for the browser and node |
for what it's worth, the official rollup plugins are already supporting |
@frank-dspeed how would this work by just dropping the |
@dnalborczyk typescript supports allowJs and checkJs flags we can then use the .js extension and get typechecking and code hints as if we would use typescript .ts. in most time the type inference will work even out of the box. so we get code hints and type checking via typescript without the need to compile the project we can even create .d.ts files while they are pritty useless if you use .js as extension + jsdoc anottated types. we can then add 2 entry points browser.js node.js and share a single module between them. It helps me a lot to be able to work with unminifyed code directly without compilation or obfusication i can then simply import a module inside a other and create a new composed object that Implements my Algos. At present i am maintaining a own automated rollup build that only compiles rollup into a ESM only Project. because on the long run i am already working on typescript-rollup i want to implement a good Plugin system into typescript and found out that rollup is a great fit for that i only need to make the AST Compatible as rollup uses acron at present. Then the next feature is to integrate typescript-rollup language features into the Language Server to support Code hints based on Rollup Plugins and the other meta data that we get. This will then finally enable Typescript
|
I think at this point it might be even sensible to drop support for |
We should wait until April. Once it's no longer a supported LTS I think it's fine to drop support. |
@mreinstein i would still vote for a current release with droped support maybe as beta because so there is more time for adoption |
This issue has been resolved via #4548 as part of rollup@3.0.0-3. Note that this is a pre-release, so to test it, you need to install Rollup via |
This issue has been resolved via #4548 as part of rollup@3.0.0-4. Note that this is a pre-release, so to test it, you need to install Rollup via |
This issue has been resolved via #4548 as part of rollup@3.0.0-5. Note that this is a pre-release, so to test it, you need to install Rollup via |
This issue has been resolved via #4548 as part of rollup@3.0.0-6. Note that this is a pre-release, so to test it, you need to install Rollup via |
This issue has been resolved via #4548 as part of rollup@3.0.0-7. Note that this is a pre-release, so to test it, you need to install Rollup via |
This issue has been resolved via #4548 as part of rollup@3.0.0-8. Note that this is a pre-release, so to test it, you need to install Rollup via |
This issue has been resolved via #4548 as part of rollup@3.0.0. You can test it via |
Feature Use Case
The interpretation of rollup.config.js files doesn't quite match the Node.js execution model leading to subtle bugs.
Feature Proposal
If we drop support for Node.js < 12, we can update the rollup configuration loader to use the Node.js native loader entirely, effectively as simple as a dynamic
import()
, ensuring all packages imported in the configuration file behave like normal Node.js ES module packages.The text was updated successfully, but these errors were encountered: