-
Notifications
You must be signed in to change notification settings - Fork 405
Open
Labels
Description
Duplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Current behavior 😯
If I import anything from resolved alias like this:
import xxx from '@lib/xxx'When try to run build, it causes the following error:
[17:40:37] ERROR [vite]: Rollup failed to resolve import "@auth/xxx" from "xxx/src/ws.ts".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
build.rollupOptions.external
Expected behavior 🤔
It should respect the existing resolve alias setting without causing any error.
Steps to reproduce 🕹
Steps:
- Open this sandbox
- Run
pnpm run build
Context 🔦
We have a very huge lib folder with many aliases. We need these to speed up the development and it's not a good practice for us to alter lib codes for Websocket use case.
Your environment 🌎
macOS or Linuxbyronwall