Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(en): merge rollup/master into rollup-docs-cn/master @ 5d91210d #156

Merged
merged 7 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# rollup changelog

## 4.24.0

_2024-10-02_

### Features

- Support preserving and transpiling JSX syntax (#5668)

### Pull Requests

- [#5668](https://github.com/rollup/rollup/pull/5668): Introduce JSX support (@lukastaegert, @Martin-Idel, @felixhuttmann, @AlexDroll, @tiptr)

## 4.23.0

_2024-10-01_
Expand Down
2 changes: 1 addition & 1 deletion browser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rollup/browser",
"version": "4.23.0",
"version": "4.24.0",
"description": "Next-generation ES module bundler browser build",
"main": "dist/rollup.browser.js",
"module": "dist/es/rollup.browser.js",
Expand Down
4 changes: 4 additions & 0 deletions browser/src/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,7 @@ export function resolve(...paths: string[]): string {

return resolvedParts.join('/');
}

// Used for running the browser build locally in Vite
export const win32 = {};
export const posix = {};
3 changes: 2 additions & 1 deletion browser/src/wasm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { parse } from '../../wasm/bindings_wasm.js';
export async function parseAsync(
code: string,
allowReturnOutsideFunction: boolean,
jsx: boolean,
_signal?: AbortSignal | undefined | null
) {
return parse(code, allowReturnOutsideFunction);
return parse(code, allowReturnOutsideFunction, jsx);
}
4 changes: 4 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import replaceBrowserModules from '../../build-plugins/replace-browser-modules';
import '../declarations.d';
import { examplesPlugin } from './create-examples';
import { renderMermaidGraphsPlugin } from './mermaid';
import { replacePathPicomatch } from './replace-path-picomatch';
import { transposeTables } from './transpose-tables';
import { buildEnd, callback, transformPageData } from './verify-anchors';

Expand Down Expand Up @@ -157,7 +158,10 @@ export default defineConfig({
title: 'Rollup 中文文档',
transformPageData,
vite: {
optimizeDeps: { exclude: ['@rollup/pluginutils'] },
plugins: [
replacePathPicomatch(),
replaceBrowserModules(),
renderMermaidGraphsPlugin(),
replaceBrowserModules(),
{
Expand Down
22 changes: 22 additions & 0 deletions docs/.vitepress/replace-path-picomatch.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import path from 'path';
import type { Plugin } from 'vite';

export function replacePathPicomatch(): Plugin {
return {
enforce: 'pre',
load(id) {
if (id === 'picomatch') {
return 'export default {}';
}
},
name: 'replace-picomatch',
resolveId(source) {
if (source === 'picomatch') {
return { id: 'picomatch' };
}
if (source === 'path') {
return path.resolve(__dirname, '../../browser/src/path.ts');
}
}
};
}
Loading
Loading