Skip to content

Releases: SukkaW/rollup-plugin-swc

0.12.1

07 Oct 19:27
Compare
Choose a tag to compare
  • Fix: respect legacy decorators. See #67

0.12.0

07 Oct 14:47
Compare
Choose a tag to compare
  • 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 version 2022-03), otherwise it is depended by experimentalDecorators from tsconfig.json (and decorator version 2021-12 will be used). See #65

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()
      ];
    }