nuxt / vercel-builder

Vercel Builder for Nuxt
MIT License
644 stars 75 forks source link

Issues when using alongside Nuxt Storybook #596

Open adamchipperfield opened 3 years ago

adamchipperfield commented 3 years ago

I'm using Nuxt Storybook and am trying to deploy this as a static app on Vercel, alongside my actual Nuxt app which sits in another project in Vecel.

Deploying the Nuxt app using this plugin is spot on! I use the preset commands and we're good to go. However, after setting up a new project for Storybook I'd done the following:

When I hit "Deploy" in Vercel it just ignores my build command overrides and spits out the Nuxt app instead of the Storybook output.

How can I get around this? It's almost like I need to tell Vercel to ignore vercel.json for this project.

I get this might need to sit under the Nuxt Storybook repo, but hoping the Vercel-specific expertise here will help me use this build plugin alongside Storybook!

danielroe commented 3 years ago

@adamchipperfield I'm not entirely sure on your project setup. You likely shouldn't be using @nuxtjs/vercel-builder for a static storybook deployment as this builder isn't for static sites - so make sure you don't have it enabled in your vercel.json (and you may even be able to delete that file).

On the other hand, if you are trying to deploy both this builder and a static site in the same deployment, you can do that by adding an additional build in your vercel.json.

If you are not overriding the build config with vercel.json, then you should also check your build and development settings: CleanShot 2021-07-26 at 11.48.56@2x.png

adamchipperfield commented 3 years ago

@danielroe Here's an example of the project structure:

So in vercel.json we're using the Vercel builder. I deploy to Vercel perfectly. Don't even need to define the commands. But when I create a separate site in order to deploy the Storybook instance it just automatically uses the builder defined in vercel.json.

I want to ignore this builder so that I can deploy the Storybook instance. I've even tried overriding the vercel.json but putting custom build commands in Vercel (like in your screenshot).

Does that make sense?

beliolfa commented 2 years ago

Hey!

I have the same issue as described here. I understand that we should add a new build step then in the vercel.json but I am not sure how to do it. Do you have any example?

Thanks!