Skip to content

jsx.mode: "preserve" doesn't work on @rollup/wasm-node #5865

@hi-ogawa

Description

@hi-ogawa

Rollup Version

"@rollup/wasm-node": "4.34.8"

Operating System (or Browser)

Linux

Node Version (if applicable)

v22.14.0

Link To Reproduction

https://stackblitz.com/github/hi-ogawa/reproductions/tree/main/rollup-wasm-jsx-preserve?file=README.md&terminal=build-wasm

Expected Behaviour

It should work like rollup and build should succeed.

(Side note: on stackblitz, both rollup and @rollup/wasm-node fail. probably this is because stackblitz automatically replaces rollup with @rollup/wasm-node?)

Actual Behaviour

Build fails by

> ./node_modules/@rollup/wasm-node/dist/bin/rollup -c


./src/main.jsx → dist...
[!] RollupError: src/main.jsx (2:8): Expression expected (Note that you need plugins to import files that are not JavaScript)
src/main.jsx (2:8)
1: export const Test = () => {
2:   return <div>Hello World!</div>;
            ^
3: };

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions