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
bump
Why don't you make a separate repo for the component library ?
Hey @MolakDul , I need to build library in my current standard Nuxt app
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
Awesome!
Great!