Replies: 5 comments 8 replies
-
Thanks for the thorough check @martpie! @shuding is already working on adding these to get feature parity 👍 |
Beta Was this translation helpful? Give feedback.
-
On an emotional note, and not like I ever expected any less, but what an incredibly professional and mature way to approach this topic @martpie. Good on you for putting the greater community before the individual ego. Looking forward to seeing more updates on the topic here! 😄 |
Beta Was this translation helpful? Give feedback.
-
Hello everyone! I am a super happy user of next-transpile-modules and it is great to see this functionality being supported natively by nextjs. Since I do not see styled-components mentioned in the 1st dimension use case, I am curious as to what the status of support for transpiling styled-components is. Assuming the new transpilePackages option is intended to support styled-components (since next-transpile-modules does) there is an issue that I have reported, available here: https://github.com/vercel/next.js/issues/46422. Transpiling styled-components via transpilePackages option does not seem to be working. If there is an alternative way/method/technology to achieve this, it would be great to learn about it and adapt my methods, else it is the only issue preventing me from using the transpilePackages option. |
Beta Was this translation helpful? Give feedback.
-
@martpie I see that you have marked your fantastic "next-transpile-modules" as deprecated with a comment that all features are now covered by next.js itself. As can bee seen by @astateful comments above this is not entirely true. |
Beta Was this translation helpful? Give feedback.
-
We seem to only be able to get
|
Beta Was this translation helpful? Give feedback.
-
Hi 👋
maintainer of
next-transpile-modules
here.@timneutkens, mentioned the new
transpilePackages
option that landed with Next.js 13, so I thought it may be finally the time to deprecate my plugin, that is widely used by the community, with almost 25% of Next.js setups using it (800K weekly downloads, 3385K fornext
).Long story short:
transpilePackages
is a very welcome addition, but is not fully ready for prime time yet, andnext-transpile-modules
covers more usecases. But the usecases gap may not make sense to be supported on Next.js.I'll detail things a bit more below.
There is a main question to be answered: how do we close gap? And more importantly, do we even close the gap?
next-transpile-modules
uses a 4 dimensions (2 primary, and 2 secondary) matrix to test various usecases:1st dimension: Use cases
test-local-module
(import and use local ES module)test-npm-module
(import and use npm ES module)test-local-typescript-module
(import a local module written in TypeScript)test-css-module
(import local component importing a css module)test-scss-module
(import local component importing a scss module)test-global-ccss
(import local component import css to be injected globally)test-global-scss
(import local component import scss to be injected globally)2nd dimension: Setup
3rd dimension: Node.js - secondary
4th dimension: Operating system - secondary
darwin
windows
linux
I'll primary talk about the 1st dimension, as the other ones are already covered/supported by Next.js in general.
So, let's get back to our list of use cases, and let's see what's compatible with the official
transpilePackages
:last update: Nov 19th, Next.js 13.0.4 (🎉)
So, if I have to simplify:✅ import ES modules❌ import TS modulesimport modules making use of CSS features (global or local css)Now, the main question: does the Next.js team plan on covering these usecases at some point? And if yes, do we have an vague idea of a potential release date? (are we talking weeks or years?)
Depending on Next.js team vision, it will heavily influence what's next for
next-transpile-modules
, let it be a deprecation, a scope reduction, or a better integration withtranspilePackages
.As always, I remain at the Next.js team disposal if you would like to learn more about why those usecases exist (I've built my fair share of Next.js apps in the past 5 years), and how we can help the community to get rid of
next-transpile-modules
once and for all. :]cheers 🚀
Beta Was this translation helpful? Give feedback.
All reactions