Socket
Socket
Sign inDemoInstall

rollup-plugin-swc3

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-swc3 - npm Package Versions

23

0.11.2

Diff

Changelog

Source

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: {}
        }),
      ],
    })
    
sukkaw
published 0.11.1 •

Changelog

Source

0.11.1

  • 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.
sukkaw
published 0.11.0 •

Changelog

Source

0.11.0

  • 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
sukkaw
published 0.10.4 •

Changelog

Source

0.10.4

  • Bump rollup-swc-preserve-directives to the latest version
sukkaw
published 0.10.3 •

Changelog

Source

0.10.3

  • Pass correct options to @swc/core (https://github.com/SukkaW/rollup-plugin-swc/pull/54 by @kdy1)
sukkaw
published 0.10.2 •

Changelog

Source

0.10.2

  • Add warning message when tsconfig is invalid
  • Add rollup 4 official support
sukkaw
published 0.10.1 •

Changelog

Source

0.10.1

  • 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.
sukkaw
published 0.10.0 •

Changelog

Source

0.10.0

  • 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: https://github.com/swc-project/swc/issues/7799 and https://github.com/swc-project/swc/issues/7800.
sukkaw
published 0.9.1 •

Changelog

Source

0.9.1

  • 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.
sukkaw
published 0.9.0 •

Changelog

Source

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()
      ];
    }
    
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc