Comments (6)
@stovmascript
It has not been released yet, but it looks like the option to use SWCLoader is already supported on the Storybook side.
Maybe we can archive storybook-addon-swc already.
from storybook-addon-swc.
Interesting. Support in SB would be great! Apart from the useSWC
builder option though, I don't see where I can pass SWC options from our .swcrc
, or does swc-loader
load the config by itself?
from storybook-addon-swc.
@Karibash, thanks for the heads up on this, and I'll defer to you to archive it. In case you do, let me know. Also, if you're interested in helping us improve the swc
loader, we'd love it. Reach out to us, and we'll go from there. And @stovmascript, I'm aware of it, and this is still experimental, and there's some work that needs to be done on that front. With that in mind, if you're interested in collaborating with @Karibash and us and helping us improve it, follow up with us as well.
Looking forward to hearing from both of you.
from storybook-addon-swc.
@jonniebigodes @Karibash Hi guys. It seems this package is not an addon per se because it doesn't really add functionality to SB, in its UI, etc. This addon seems to make use of swc-loader
, to enable compilation via SWC instead of Babel, which Storybook makes use of internally.
We use Next.js with SWC and currently it won't compile in SB7. Interestingly, it still seems to successfully modify the webpack config.module.rules
and add swc-loader
, but fails from what seems to be the final phase of the build (minification, etc.) as I see the TerserPlugin
and even HtmlWebpackPlugin
output show up around the point of the crash.
from storybook-addon-swc.
@jonniebigodes I'm wondering whether the Framework API suggestion is appropriate for this package. Shouldn't we be looking at the Builder API, or somewhere else? Thanks.
from storybook-addon-swc.
@jonniebigodes I would be interested in contributing the ability to add SWC options in a similar fashion to how Babel options are loaded, maybe with the distinction of not automatically parsing the user's .swcrc
and having them provide the options along with useSWC
.
Also, I think @swc/core
should be moved to peer dependencies because of its current breaking nature. If you use SWC plugins in Next.js, @swc/core
needs to be compatible by all parties - see https://swc.rs/docs/plugin/selecting-swc-core. Having Storybook depend on it by itself makes it a bit harder to resolve the correct version.
@Karibash What do you think? I see you've also moved @swc/core
here in #48.
from storybook-addon-swc.
Related Issues (12)
- [Help Wanted] Config SWC compiler with PostCSS, Tailwind and custom alias HOT 13
- exports is not definied using @storybook/testing-library HOT 2
- Example usage with swc plugins HOT 3
- Missing webpack dep in example project package.json files HOT 1
- Breaking change in recent version HOT 5
- Broken dependencies HOT 2
- Optional dependency should not be statically imported HOT 1
- Error when used with emotion-swc-plugin HOT 1
- Production build breaks with CSF 3.0 automatic title generation
- Question: Does storybook-addon-swc work when using the command npm run build-storybook? HOT 1
- [email protected] requires package extensions with Yarn 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from storybook-addon-swc.