Is it Possible to Build both normal Nuxt app and Component Library in one config file?

I'm going to build component library in normal nuxt app. I've already setup vite.config.ts file to build component library. But it says, Nuxt doesn't support vite.config.ts with nuxt.config.ts. How can I achieve this?
5 Replies
grandknight
grandknightOP7mo ago
bump
MolakDul
MolakDul6mo ago
Why don't you make a separate repo for the component library ?
grandknight
grandknightOP6mo ago
Hey @MolakDul , I need to build library in my current standard Nuxt app
MolakDul
MolakDul6mo ago
Ok ok, i think your problem come from the fact that when you run "yarn dev" or "npm run dev" nuxt detect you have a vite.config.ts file and this cause your actual issue right ? Then you could rename your vite.config.ts file into something like vite.config.lib.ts and make the build with the following command: vite --config vite.config.lib.ts And nuxt won't complain anymore
grandknight
grandknightOP6mo ago
Awesome! Great!
Want results from more Discord servers?
Add your server