Skip to content

Commit 72ce23b

Browse files
authored
Merge pull request #156 from rollup/sync-5d91210d
docs(en): merge rollup/master into rollup-docs-cn/master @ 5d91210
2 parents 569bdef + 41a2f8a commit 72ce23b

File tree

354 files changed

+5128
-1425
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

354 files changed

+5128
-1425
lines changed

CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# rollup changelog
22

3+
## 4.24.0
4+
5+
_2024-10-02_
6+
7+
### Features
8+
9+
- Support preserving and transpiling JSX syntax (#5668)
10+
11+
### Pull Requests
12+
13+
- [#5668](https://github.com/rollup/rollup/pull/5668): Introduce JSX support (@lukastaegert, @Martin-Idel, @felixhuttmann, @AlexDroll, @tiptr)
14+
315
## 4.23.0
416

517
_2024-10-01_

browser/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rollup/browser",
3-
"version": "4.23.0",
3+
"version": "4.24.0",
44
"description": "Next-generation ES module bundler browser build",
55
"main": "dist/rollup.browser.js",
66
"module": "dist/es/rollup.browser.js",

browser/src/path.ts

+4
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,7 @@ export function resolve(...paths: string[]): string {
8585

8686
return resolvedParts.join('/');
8787
}
88+
89+
// Used for running the browser build locally in Vite
90+
export const win32 = {};
91+
export const posix = {};

browser/src/wasm.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import { parse } from '../../wasm/bindings_wasm.js';
55
export async function parseAsync(
66
code: string,
77
allowReturnOutsideFunction: boolean,
8+
jsx: boolean,
89
_signal?: AbortSignal | undefined | null
910
) {
10-
return parse(code, allowReturnOutsideFunction);
11+
return parse(code, allowReturnOutsideFunction, jsx);
1112
}

docs/.vitepress/config.ts

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import replaceBrowserModules from '../../build-plugins/replace-browser-modules';
77
import '../declarations.d';
88
import { examplesPlugin } from './create-examples';
99
import { renderMermaidGraphsPlugin } from './mermaid';
10+
import { replacePathPicomatch } from './replace-path-picomatch';
1011
import { transposeTables } from './transpose-tables';
1112
import { buildEnd, callback, transformPageData } from './verify-anchors';
1213

@@ -157,7 +158,10 @@ export default defineConfig({
157158
title: 'Rollup 中文文档',
158159
transformPageData,
159160
vite: {
161+
optimizeDeps: { exclude: ['@rollup/pluginutils'] },
160162
plugins: [
163+
replacePathPicomatch(),
164+
replaceBrowserModules(),
161165
renderMermaidGraphsPlugin(),
162166
replaceBrowserModules(),
163167
{
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import path from 'path';
2+
import type { Plugin } from 'vite';
3+
4+
export function replacePathPicomatch(): Plugin {
5+
return {
6+
enforce: 'pre',
7+
load(id) {
8+
if (id === 'picomatch') {
9+
return 'export default {}';
10+
}
11+
},
12+
name: 'replace-picomatch',
13+
resolveId(source) {
14+
if (source === 'picomatch') {
15+
return { id: 'picomatch' };
16+
}
17+
if (source === 'path') {
18+
return path.resolve(__dirname, '../../browser/src/path.ts');
19+
}
20+
}
21+
};
22+
}

0 commit comments

Comments
 (0)