Skip to content

Releases: SukkaW/rollup-plugin-swc

0.11.2

09 May 08:35
Compare
Choose a tag to compare
  • 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

16 Apr 10:38
Compare
Choose a tag to compare
  • Fix #63
    • Previously, rollup-plugin-swc3 only handled relative compilerOptions.baseUrl when compilerOptions.paths is specified. It is fixed in #64, now rollup-plugin-swc3 will handle relative compilerOptions.baseUrl as long as it is specified.

0.11.0

06 Dec 06:44
Compare
Choose a tag to compare
  • Fix #58
    • rollup-plugin-swc3 now will only perform module resolution inside the files specified in include and exclude options.
  • Replace rollup-swc-preserve-directives with rollup-preserve-directives

0.10.2

07 Oct 04:13
Compare
Choose a tag to compare

0.10.2

  • Add warning messages when tsconfig is invalid
  • Add rollup 4 official support

0.10.1

27 Aug 09:50
Compare
Choose a tag to compare
  • Fix #41
    • rollup-plugin-swc3 now will always provide baseUrl (resolve to an absolute path) to swc as long as the paths is specified in the tsconfig.json or jsconfig.json being read.

0.10.0

27 Aug 09:14
Compare
Choose a tag to compare
  • Fix #41
    • rollup-plugin-swc3 now will resolve baseUrl to an absolute path against the tsconfig.json and jsconfig.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

16 Jul 10:23
Compare
Choose a tag to compare

The support for 'use client' and 'use server' has been separated into a standalone rollup plugin rollup-swc-preserve-directives, maintained by @huozhi and me. The previous preserveUseDirective named export is retained for the backward compatibility.

0.9.0

08 Jul 07:38
Compare
Choose a tag to compare
  • 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()
      ];
    }

0.8.2

02 Jun 11:02
Compare
Choose a tag to compare

0.8.2

  • Enable CI auto publish release + npm provenance

0.8.1

24 Mar 08:30
Compare
Choose a tag to compare
  • Fix TypeScript declaration of include and exclude option (#32)