-
Notifications
You must be signed in to change notification settings - Fork 28.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Cannot create alias #1535
Comments
You have to handle aliasing in babel since we don't use webpack on all code. There is a ticket for universal webpack. Till then you can use the same code used for aliasing preact here: https://github.com/zeit/next.js/tree/master/examples/using-preact |
Here's the ticket about universal webpack: #1245 |
Try this babel plugin, and works 🔥 https://www.npmjs.com/package/babel-plugin-module-alias 👍🏼 |
There's an example for doing this now https://github.com/zeit/next.js/tree/master/examples/with-absolute-imports |
Modify
next.config.js
file to add alias into webpack, but failed. (sometimes work)Here's my config
next.config.js
throw this error
The text was updated successfully, but these errors were encountered: