Skip to content

Commit

Permalink
Add jsx example
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastaegert committed Oct 2, 2024
1 parent ef9bbc4 commit 4b2e94b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/repl/examples/07/example.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"title": "Multiple Entry Modules",
"entryModules": ["main.js", "otherEntry.js"],
"options": {
"output": {
"minifyInternalExports": false,
"preserveModules": false
}
}
"entryModules": ["main.js", "otherEntry.js"],
"options": {
"output": {
"minifyInternalExports": false,
"preserveModules": false
}
}
}
8 changes: 8 additions & 0 deletions docs/repl/examples/08/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"title": "JSX",
"options": {
"jsx": {
"mode": "preserve"
}
}
}
6 changes: 6 additions & 0 deletions docs/repl/examples/08/modules/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// JSX SUPPORT
// Try different jsx.mode and see how it is transformed
import './other.js';
const Foo = ({ world }) => <div>Hello {world}!</div>;

console.log(<Foo world="World" />);
2 changes: 2 additions & 0 deletions docs/repl/examples/08/modules/other.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const Foo = () => <div>This is deconflicted!</div>;
console.log(<Foo />);

0 comments on commit 4b2e94b

Please sign in to comment.