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
grandknight2w ago
bump
MolakDul
MolakDul2w ago
Why don't you make a separate repo for the component library ?
grandknight
grandknight2w ago
Hey @MolakDul , I need to build library in my current standard Nuxt app
MolakDul
MolakDul2w 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
grandknight2w ago
Awesome! Great!
Want results from more Discord servers?
Add your server
More Posts
help updated to new version with new config future: {} and deployed to vercel i got this message in``` [nuxt] [request error] [unhandled] [500] Cannot find module '/var/task/node_modules/vue/server-rSupport of the new URL(..., import.meta.url) syntax?Hey guys, I wanted to know if nuxt.js supports the `new URL(..., import.meta.url)` syntax. If therRead and set a value to use inside of template during build timeI want to access my project's version inside my template, the "version" field in `package.json`. I'dcss changes using tailwindcss only applying after a couple secondsI am curently using PrimeVue and testing it out so I loaded a Menubar, it is loaded perfectly fine a500 import not found: setupDevtoolsPluginI'm getting this strange error when loading up a page in my nuxt application. when i comment out theBest approach to load component data for multiple db backed select components on the same pageHi everyone, I'm currently developing a new frontend + admin panel for an existing recipe database aSelectMenu - How to change width?How would I go about changing the width of the field and dropdown list? Edit: to be clear - this on`import.meta` meta-property is only allowed when the --module option is ...Hi! After updating to Nuxt 3.12.2, in some of my projects, I started getting the following error wheHow can I import a markdown file from /assets?I've got a markdown file named "CHANGELOG.md" in my /assets folder that I want to import using typesAsync Data and useSeoMetaHi, I am currently using Nuxt 3 on my website and I use useSeoMeta to change my meta datas. When I