Code Monkey home page Code Monkey logo

Comments (5)

IanVS avatar IanVS commented on July 30, 2024 1

This is a good question for @benmccann, but my understanding is that the vite plugin is only for options that would normally have been specified in the vite portion of svelte.config.js. As such, I think that the svelteOptions are still needed, since those are provided to @sveltejs/vite-plugin-svelte, and aren't really related to sveltekit, but rather svelte itself. But I could well be wrong here, I'm not terribly familiar with svelte or sveltekit.

from storybook-experimental-vite.

benmccann avatar benmccann commented on July 30, 2024

Thank you so much for testing this!

I would expect the svelteOptions to live in svelte.config.js. SvelteKit and vite-plugin-svelte will both read that file. If the Storybook Svelte plugin needs those options it would probably be nice to have it read that file as well to avoid making the user specify the options twice

I'm also a bit surprised that you need to specify viteFinal. I'm not that familiar with that option and how it works, but I would expect that the SvelteKit Vite plugin would be providing those aliases for you so that you don't need to specify them again

from storybook-experimental-vite.

benmccann avatar benmccann commented on July 30, 2024

Btw, feel free to hop onto Discord if you'd like faster responses. We could coordinate in the Vite server since I know both Ian and myself are on that one. I'll start coordinating with him in the #storybook channel. Hopefully we can figure out the alias issue.

I thought I'd answer the open questions from the readme:

Vite 3 support? Is it important? Do we need to pin to vite 2 for now? (storybookjs/builder-vite#394)

Neither Storybook nor SvelteKit support it yet though we're both testing against it. For now, there's no need to support it and I wouldn't worry about it, but SvelteKit will switch to it once the final release is out, which will probably be in the next week or two. On the SvelteKit side I don't think you'll have to do anything except bump the SvelteKit version.

Importance of adapters? I don't think that adapters matter at all for what shows up in the .svelte-kit/runtime dir, right? Only the contents of the .svelte-kit/build dir are affected?

Don't worry about adapters at all. Neither dev nor preview use them. They're only for when you deploy to production. The location of the build output for adapters varies by adapter.

from storybook-experimental-vite.

michaelwooley avatar michaelwooley commented on July 30, 2024

Thanks for all of this info @benmccann and @IanVS!

After work I'll try #7, write an actual reply, and hop onto the discord.

If you find this to be a useful test project I'd be happy to give you merge permissions, etc. so that you don't have to wait on me. Whatever works for you. (I don't have any grand plans for this repo: It is only meant to test this out.)

from storybook-experimental-vite.

benmccann avatar benmccann commented on July 30, 2024

Thanks @michaelwooley! I'd be happy to have merge permissions. I'd love to get this repo in a good state and then create a Svelte Adder for Storybook. Once we have that then we probably won't need this repo anymore, but it's a nice place to get something working as the basis of an Adder. If you could either merge #7 or give me permission to, that would be great!

from storybook-experimental-vite.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.