You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a monorepo (turborepo), 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:
failed to load config from C:\Users\andre\Desktop\Code\Stuff\vite-shared-config\apps\vue-project\vite.config.ts
error when starting dev server:
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for C:\Users\andre\Desktop\Code\Stuff\vite-shared-config\packages\vite-config\src\index.ts
Interestingly enough that if I change the import statement from import { ViteConfigBase } from 'vite-config' to import { 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.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Describe the bug
I have a monorepo (turborepo), 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.
Reproduction
https://github.com/Rusinas/vite-shared-config-bug
Steps to reproduce
cd apps/vue-project
npm i
npm run dev
?????
ERROR!
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: