What's not working?
Redwood.js relies on tsconfig path aliases. Vite doesn't support path aliases out of the box. One need to install the vite-tsconfig-paths vite plugin and add it to the vite configuration to allow usage of path aliases.
// rest imports
import tsconfigPaths from 'vite-tsconfig-paths'
// rest config
const viteConfig: UserConfig = {
plugins: [redwood(), tsconfigPaths()],
}
export default defineConfig(viteConfig)
It would be good to at least mention the additional steps required for vite to work when setting up vite.
How do we reproduce the bug?
yarn rw setup vite && yarn rw dev
- add import using path alias in any web workspace component
- see error
What's your environment? (If it applies)
No response
Are you interested in working on this?
What's not working?
Redwood.js relies on tsconfig path aliases. Vite doesn't support path aliases out of the box. One need to install the
vite-tsconfig-pathsvite plugin and add it to the vite configuration to allow usage of path aliases.It would be good to at least mention the additional steps required for vite to work when setting up vite.
How do we reproduce the bug?
yarn rw setup vite && yarn rw devWhat's your environment? (If it applies)
No response
Are you interested in working on this?