Skip to content

Commit

Permalink
release: 0.11.2
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed May 9, 2024
1 parent 19b834d commit de7e45d
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
## 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.

```js
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

- Fix [#63](https://github.com/SukkaW/rollup-plugin-swc/issues/63)
Expand Down
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,23 @@ export default {
const swcMinifyConfig = {}
```

If you are are using Vite and you do not want to use `terser` or `esbuild` for minification, `rollup-plugin-swc3` also provides a standalone minify plugin designed for Vite:

```js
import { defineConfig } from 'vite';
import { viteMinify } from 'rollup-plugin-swc3'

export default defineConfig({
plugins: [
viteMinify({
// swc's minify option here
// mangle: {}
// compress: {}
}),
],
})
```

### React Server Component directives (`'use client'` and `'use server'`)

~~Since version `0.9.0`, the support for `'use client'` and `'use server'` has been added:~~
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rollup-plugin-swc3",
"version": "0.11.1",
"version": "0.11.2",
"description": "Use SWC with Rollup to transform ESNext and TypeScript code.",
"homepage": "https://github.com/SukkaW/rollup-plugin-swc#readme",
"repository": {
Expand Down

0 comments on commit de7e45d

Please sign in to comment.