-
Notifications
You must be signed in to change notification settings - Fork 27.6k
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
Error resolving EcmaScript Modules request (icons from the library stopped working after the update) #54063
Closed
1 task done
Comments
13.4.13 also does not work on this version. Only on 13.4.12 and earlier |
Still broken :/ |
shuding
added a commit
that referenced
this issue
Aug 25, 2023
…ig (#54572) ## Implementation Base on #54530, we're implementing a `optimize_barrel` transform to optimize barrel files to only export the names we need. If the transformed file isn't a "barrel file", we just re-export the names from it without any transformation. Take `lucide-react` as an example, with #54530 we are able to transform ```js import { IceCream } from 'lucide-react' ``` to ```js import { IceCream } from '__barrel_optimize__?names=IceCream!=!lucide-react?__barrel_optimize_noop__=IceCream' ``` And then, we apply that new request with a new Webpack module rule to use the SWC loader with option `optimizeBarrelExports: ['IceCream']`, which eventually got passed to this new `optimize_barrel` transform and does the optimization. ## Notes We'll have to add a new `getModularizeImportAliases` alias list to map `lucide-react` to the ESM version, as we have the `['main', 'module']` resolve order for the server compiler. Otherwise this optimization doesn't work in that compiler. There's no e2e test added because it's already covered by the `modularize-imports` test as we removed the default `lucide-react` transform rules and it still works. We'll need to test other libs before migrating them to the new `optimizePackageImports` option. --- Closes #54571, closes #53605, closes #53789, closes #53894, closes #54063.
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue or a replay of the bug
/sdssdsdd
To Reproduce
/ssssdssdsdsd
Describe the Bug
I use the shadcn ui library. It in turn uses radix/ui and lucide-react. When connecting icons from lucide, I get an error after upgrading to version 13.4.15-13.4.16. Before that, there was version 13.4.11 and everything was fine and I wanted to update and I started getting an error when connecting icons from the lucide-react library
![image](https://private-user-images.githubusercontent.com/59291123/260755782-50585c5f-f5e2-4129-9aa8-b3c877470f85.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMDExMjAsIm5iZiI6MTczOTMwMDgyMCwicGF0aCI6Ii81OTI5MTEyMy8yNjA3NTU3ODItNTA1ODVjNWYtZjVlMi00MTI5LTlhYTgtYjNjODc3NDcwZjg1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDE5MDcwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ3OGFiNTU2N2EzZTFjNDYwYzJhZmY5MjdlMTc4ZjA3NjQ0ODc2YjRjODBhMTRjNjQzMjM1NmRlYzEzZmNkMmUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Mq82UHCp7bassVhDEyTwKhhyffGmM8ViPFmjnowI9rI)
![image](https://private-user-images.githubusercontent.com/59291123/260756718-c1c92032-1a87-4b08-a091-463a0ae0383d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMDExMjAsIm5iZiI6MTczOTMwMDgyMCwicGF0aCI6Ii81OTI5MTEyMy8yNjA3NTY3MTgtYzFjOTIwMzItMWE4Ny00YjA4LWEwOTEtNDYzYTBhZTAzODNkLnBuZz9YLUFtei1BbGdvcml0aG09Q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vgwj6RrTlJvUP6jdpKIB93WHHg8g_rNVicBw1JP465I)
![image](https://private-user-images.githubusercontent.com/59291123/260757014-ad19fa35-0293-4280-9db0-9e4eeb0c2e45.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMDExMjAsIm5iZiI6MTczOTMwMDgyMCwicGF0aCI6Ii81OTI5MTEyMy8yNjA3NTcwMTQtYWQxOWZhMzUtMDI5My00MjgwLTlkYjAtOWU0ZWViMGMyZTQ1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDE5MDcwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTczNjI2MTM2ZGJjMWNkZmU5YzliOWQ4ZjhhMTMxNmQ5NmRkOTNhYTVlZWFhMDUwMTUzNDQxZjU1N2Y0NWNmYjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.H5bD_oqGfD8tZ6tqyt9hDBuGJ-Ckmxm5m27xCllrRM8)
![image](https://private-user-images.githubusercontent.com/59291123/260757293-9afc65a6-5f09-4e88-93b4-71c0a60b0709.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMDExMjAsIm5iZiI6MTczOTMwMDgyMCwicGF0aCI6Ii81OTI5MTEyMy8yNjA3NTcyOTMtOWFmYzY1YTYtNWYwOS00ZTg4LTkzYjQtNzFjMGE2MGIwNzA5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDE5MDcwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA4Njg0YWI2NGY2MmZlMTk2YzVmNmFiNGIwNzEyYjYzMDI4Y2FlZjdkMDU4NTEyNDgzMWFlZDgwNWUyZmY4YTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Ujg6QWL1Fjq1di2KcXjmW4Ga4c8-LwjXheOWIKCK5cE)
Expected Behavior
work
Which browser are you using? (if relevant)
chrome
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: