Replies: 1 comment
-
So the only solution I've managed to come up with, is aliasing. // vite config
defineConfig({
resolve: {
alias: {
'@': './src',
'@mytest/lib': '../lib/src'
}
}
});
// tsconfig.json
{
"compilerOptions": {
"paths": {
"@/*": ["src/*"]
"@mytest/lib": ["../lib/src/index.ts"]
}
}
} Now, the downside to this approach, is that |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Repo: https://github.com/alex-dow/vite-issue
Possibly a related discussion: #7155
I'm not sure this is a bug, so I will start here.
ui
packagefoo
andbar
being requiredpackages/lib/src/components/lib/myComponentTypes.ts
and edit the interfaces so that thebar
andfoo
properties are optional using a "?"Do this, and note that nothing changes in the browser. The warnings do not go away on a page reload. Pressing "R" to restart the vite server does nothing at all. The only way to get rid of those warnings, is to force stop the vite server and restart it. This is obviously not what I want. I was expecting vite to treat the
lib
package no differently than theui
package.I tried disabling optimized dependencies in the
ui
package to no avail. I've tried removing@mytest/lib
from the list of dependencies in theui
package, but also to no avail.I looked at #7155 - but nothing there seemed to work for me.
I want this setup as it is in this repo, because Vite does not support incremental builds as far as I can tell, and when working on workspace packages while running a dev server on an app package, I do not want the app to refresh every time a change happens in a workspace package.
Is this a bug or is there is a way to make this work?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions