Can't use shared vite.config.ts in monorepo #6931
Labels
kind: bug
Something isn't working
needs: triage
New issues get this label. Remove it after triage
owned-by: turborepo
Verify canary release
Link to code that reproduces this issue
https://github.com/Rusinas/vite-shared-config-bug
What package manager are you using / does the bug impact?
npm
What operating system are you using?
Windows
Which canary version will you have in your reproduction?
1.11.3
Describe the Bug
I have a monorepo, where I've got a bunch of Vue apps and I want to share vite.config.ts across all of them. The problem is that I am getting tons of errors and I can't figure it out.
When I try to export shared config and use it, I get the following error:
Interestingly enough that if I change the import statement from
import { ViteConfigBase } from 'vite-config'
toimport { ViteConfigBase } from '../../packages/vite-config/src/vite.config.base'
, everything will work just fine. But that's only for dev. If I want to build it inside of a Docker container, it will fail.Changing the file extension to
.js
is not helping too.I don't know if the problem is with Vite or Turborepo, but I am kinda desperate right now and will appreciate any help.
Expected Behavior
Shared config from the package is working fine.
To Reproduce
cd apps/vue-project
npm i
npm run dev
?????
ERROR!
Additional context
No response
The text was updated successfully, but these errors were encountered: