vite config doesn't seem to be automatically merging #549
-
I have this in my main.js file
and this is what my plugin portion of my vite.config.js file looks like
it does seem that i have to manually add the plugins (ts config paths), as my errors for imports are resolved when I add it to the mergeConfig. I am now stuck as the error I now get is related to babel plugin macros, where I would need the to add the react plugin (which would cause it to break). I read that builder-vite should automatically read your vite config, but it doesn't seem to be the case for me (if i remove tsConfigPaths from main.js I do not see it in the logs). Is there perhaps a crucial step that I am missing for getting it to read in my vite config? Here are the errors I get when I don't include ts-path-plugin and when I do (but no babel plugins active) my package json for vite dependencies are
EDIT: I tried to attempt something like this #113, but it doesn't seem to passed from the config variable supplied by viteFinal |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
My problem was that "@storybook/react-vite": "^7.0.0-alpha.25", was on old version, and I was a little bit too tunnel visioned and couldn't see it. I ended up upgrading it when I tried to use the autoupgrader and it did the trick and now uses the vite.config.ts. after fixing this i encountered this storybookjs/storybook#15391, but this was an easy fix. Luckily all the problems were found in all old issues and that I could resolve this. Works great! |
Beta Was this translation helpful? Give feedback.
My problem was that "@storybook/react-vite": "^7.0.0-alpha.25", was on old version, and I was a little bit too tunnel visioned and couldn't see it. I ended up upgrading it when I tried to use the autoupgrader and it did the trick and now uses the vite.config.ts.
after fixing this i encountered this storybookjs/storybook#15391, but this was an easy fix.
Luckily all the problems were found in all old issues and that I could resolve this. Works great!