Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
storybook-addon-swc
Advanced tools
Storybook addon that improves build time by building with swc.
$ npm install -D storybook-addon-swc @swc/core
Edit the .storybook/main.js
file and register the addon.
module.exports = {
addons: [
'storybook-addon-swc',
],
};
Additional configuration options can be passed as needed.
module.exports = {
addons: [
{
name: 'storybook-addon-swc',
options: {
enable: true,
enableSwcLoader: true,
enableSwcMinify: true,
swcLoaderOptions: {},
swcMinifyOptions: {},
},
},
],
};
Name | Description | Type | Default Value |
---|---|---|---|
enable | If set to false, this add-on will be disabled. | boolean | true |
enableSwcLoader | If set to false, swc-loader is disabled and babel-loader is used. | boolean | true |
enableSwcMinify | If set to false, minify using swc is disabled and minify using conventional terser is used. | boolean | true |
swcLoaderOptions | Options for swc loader. | object | see |
swcMinifyOptions | Options for swc minify. | object | see |
The SWC plugins feature is still experimental, but can be used by changing the settings as follows.
module.exports = {
addons: [
{
name: 'storybook-addon-swc',
options: {
swcLoaderOptions: {
jsc: {
experimental: {
plugins: [['plugin-name', {}]],
},
},
},
},
},
],
};
This add-on replaces babel-loader with esbuild-loader.
It was used as a reference in the development of storybook-addon-swc.
This builder changes the build system of Storybook from Webpack to Vite.
Vite is very fast because it does not bundle during development.
Contributions, issues and feature requests are welcome.
Feel free to check issues page if you want to contribute.
Copyright © 2020 @Karibash.
This project is MIT
licensed.
FAQs
Storybook add-on to enable SWC builds.
The npm package storybook-addon-swc receives a total of 45,648 weekly downloads. As such, storybook-addon-swc popularity was classified as popular.
We found that storybook-addon-swc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.