storybook-addon-swc
Advanced tools
Comparing version 1.1.8 to 1.1.9
@@ -87,3 +87,3 @@ 'use strict'; | ||
return _extends({}, config, { | ||
optimization: { | ||
optimization: _extends({}, config.optimization, { | ||
minimizer: 0 < ((_config$optimization = config.optimization) == null ? void 0 : (_config$optimization$ = _config$optimization.minimizer) == null ? void 0 : _config$optimization$.length) ? [new TerserPlugin({ | ||
@@ -94,3 +94,3 @@ minify: TerserPlugin.swcMinify, | ||
})] : [] | ||
} | ||
}) | ||
}); | ||
@@ -97,0 +97,0 @@ }; |
@@ -87,3 +87,3 @@ 'use strict'; | ||
return _extends({}, config, { | ||
optimization: { | ||
optimization: _extends({}, config.optimization, { | ||
minimizer: 0 < ((_config$optimization = config.optimization) == null ? void 0 : (_config$optimization$ = _config$optimization.minimizer) == null ? void 0 : _config$optimization$.length) ? [new TerserPlugin({ | ||
@@ -94,3 +94,3 @@ minify: TerserPlugin.swcMinify, | ||
})] : [] | ||
} | ||
}) | ||
}); | ||
@@ -97,0 +97,0 @@ }; |
@@ -79,3 +79,3 @@ import merge from 'deepmerge'; | ||
return _extends({}, config, { | ||
optimization: { | ||
optimization: _extends({}, config.optimization, { | ||
minimizer: 0 < ((_config$optimization = config.optimization) == null ? void 0 : (_config$optimization$ = _config$optimization.minimizer) == null ? void 0 : _config$optimization$.length) ? [new TerserPlugin({ | ||
@@ -86,3 +86,3 @@ minify: TerserPlugin.swcMinify, | ||
})] : [] | ||
} | ||
}) | ||
}); | ||
@@ -89,0 +89,0 @@ }; |
{ | ||
"name": "storybook-addon-swc", | ||
"version": "1.1.8", | ||
"version": "1.1.9", | ||
"description": "Storybook add-on to enable SWC builds.", | ||
@@ -5,0 +5,0 @@ "main": "dist/storybook-addon-swc.cjs.js", |
@@ -62,4 +62,4 @@ # storybook-addon-swc | ||
| `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](https://swc.rs/docs/configuration/compilation) | [see](https://github.com/Karibash/storybook-addon-swc/blob/master/src/index.ts#L19-L32) | | ||
| `swcMinifyOptions` | Options for swc minify. | [object](https://swc.rs/docs/configuration/minification) | [see](https://github.com/Karibash/storybook-addon-swc/blob/master/src/index.ts#L33-L37) | | ||
| `swcLoaderOptions` | Options for swc loader. | [object](https://swc.rs/docs/configuration/compilation) | [see](https://github.com/Karibash/storybook-addon-swc/blob/main/src/index.ts#L21-L35) | | ||
| `swcMinifyOptions` | Options for swc minify. | [object](https://swc.rs/docs/configuration/minification) | [see](https://github.com/Karibash/storybook-addon-swc/blob/main/src/index.ts#L36-L40) | | ||
@@ -66,0 +66,0 @@ ### SWC Plugins |
@@ -71,2 +71,3 @@ import { Configuration, ModuleOptions, RuleSetRule } from 'webpack'; | ||
optimization: { | ||
...config.optimization, | ||
minimizer: 0 < config.optimization?.minimizer?.length | ||
@@ -73,0 +74,0 @@ ? [new TerserPlugin({ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30432
568