Replies: 1 comment
-
Yes, webpack aliases will work in both your client & server (API routes, getStaticProps, getServerProps, etc.) code 🎉 Also (and you may know this!) Next can now do these aliases for you: https://nextjs.org/docs/advanced-features/module-path-aliases |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
question
supposi i have a component:
and i'm resolving
@best-lib/fruit
through a webpack alias, should i expect my server to also be able to resolve@best-lib/fruit
? in other words, does server code use webpack aliases, or should i be using babel import transforms? alternate angle on the sasme consideration, what if i'm writing an API route in next, and i want agetBananas
resolved in both an API route AND a UI route--will webpack aliases do all the good stuff?Beta Was this translation helpful? Give feedback.
All reactions