Skip to content

Commit

Permalink
release: 0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed Jul 8, 2023
1 parent dd5176d commit b0bf58c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
## 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`:

```diff
// rollup.config.js
// Import `preserveUseDirective` from `rollup-plugin-swc3`...
- import { swc } from 'rollup-plugin-swc3';
+ import { swc, preserveUseDirective } from 'rollup-plugin-swc3';

// rollup.config.js
import { swc } from 'rollup-plugin-swc3';

export default {
input: 'xxxx',
output: {},
plugins: [
swc(),
+ preserveUseDirective()
];
}
```

## 0.8.2

- Enable CI auto publish release + npm provenance
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,10 @@ const swcMinifyConfig = {}
Since version `0.9.0`, the support for `'use client'` and `'use server'` has been added:

```js
// rollup.config.js
// Import `preserveUseDirective` from `rollup-plugin-swc3`...
import { swc, preserveUseDirective } from 'rollup-plugin-swc3';

// rollup.config.js
import { swc } from 'rollup-plugin-swc3';

export default {
input: 'xxxx',
output: {},
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.8.2",
"version": "0.9.0",
"description": "Use SWC with Rollup to transform ESNext and TypeScript code.",
"main": "dist/index.js",
"module": "dist/index.mjs",
Expand Down

0 comments on commit b0bf58c

Please sign in to comment.