Releases: SukkaW/rollup-plugin-swc
Releases · SukkaW/rollup-plugin-swc
0.12.1
0.12.0
- The minimum required version has been bumped from 12 to 16.
- Now when TypeScript 5 is detected in your projects will
rollup-plugin-swc3
enable decorators by default (with decorator version2022-03
), otherwise it is depended byexperimentalDecorators
fromtsconfig.json
(and decorator version2021-12
will be used). See #65
0.11.2
-
New feature
viteMinify
to use swc's minification in Vite.- When used, it will disable Vite's built-in minification and use swc's minification instead.
import { defineConfig } from 'vite'; import { viteMinify } from 'rollup-plugin-swc3' export default defineConfig({ plugins: [ viteMinify({ // swc's minify option here // mangle: {} // compress: {} }), ], })
0.11.1
0.11.0
0.10.2
0.10.1
0.10.0
- Fix #41
rollup-plugin-swc3
now will resolvebaseUrl
to an absolute path against thetsconfig.json
andjsconfig.json
being read.- This is to align with the behavior change of the
swc
: swc-project/swc#7799 and swc-project/swc#7800.
0.9.1
0.9.0
-
Add support for bundling library for React Server Component with the proper
'use client'
and'use server'
directives handling:- Merge duplicated directives in the final bundles
- Multiple output chunks will have their own separated directives, useful when bundling client only code and server only code in different bundles.
- Not enabled by default. manually opt-in by changing two lines of code in your
rollup.config.js
:
// rollup.config.js // Import `preserveUseDirective` from `rollup-plugin-swc3`... - import { swc } from 'rollup-plugin-swc3'; + import { swc, preserveUseDirective } from 'rollup-plugin-swc3'; export default { input: 'xxxx', output: {}, plugins: [ swc(), + preserveUseDirective() ]; }