diff options
| author | Kitson Kelly <me@kitsonkelly.com> | 2021-11-09 12:26:39 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-09 12:26:39 +1100 |
| commit | f5eb177f50a0bf37bc6bd9d87b447c73a53b6ea5 (patch) | |
| tree | 1990dadf311de59b45c677e234219a161f3ebf9d /cli/tests/testdata/jsx | |
| parent | 45425c114610516287c8e5831c9b6f023dfc8180 (diff) | |
feat(cli): support React 17 JSX transforms (#12631)
Closes #8440
Diffstat (limited to 'cli/tests/testdata/jsx')
| -rw-r--r-- | cli/tests/testdata/jsx/deno-jsx-import-map.jsonc | 6 | ||||
| -rw-r--r-- | cli/tests/testdata/jsx/deno-jsx.jsonc | 6 | ||||
| -rw-r--r-- | cli/tests/testdata/jsx/deno-jsxdev-import-map.jsonc | 6 | ||||
| -rw-r--r-- | cli/tests/testdata/jsx/deno-jsxdev.jsonc | 6 | ||||
| -rw-r--r-- | cli/tests/testdata/jsx/import-map.json | 6 | ||||
| -rw-r--r-- | cli/tests/testdata/jsx/jsx-dev-runtime/index.ts | 12 | ||||
| -rw-r--r-- | cli/tests/testdata/jsx/jsx-runtime/index.ts | 12 |
7 files changed, 54 insertions, 0 deletions
diff --git a/cli/tests/testdata/jsx/deno-jsx-import-map.jsonc b/cli/tests/testdata/jsx/deno-jsx-import-map.jsonc new file mode 100644 index 000000000..5adbfa8b5 --- /dev/null +++ b/cli/tests/testdata/jsx/deno-jsx-import-map.jsonc @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "jsx": "react-jsx", + "jsxImportSource": "jsx" + } +} diff --git a/cli/tests/testdata/jsx/deno-jsx.jsonc b/cli/tests/testdata/jsx/deno-jsx.jsonc new file mode 100644 index 000000000..311409ea3 --- /dev/null +++ b/cli/tests/testdata/jsx/deno-jsx.jsonc @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "jsx": "react-jsx", + "jsxImportSource": "http://localhost:4545/jsx" + } +} diff --git a/cli/tests/testdata/jsx/deno-jsxdev-import-map.jsonc b/cli/tests/testdata/jsx/deno-jsxdev-import-map.jsonc new file mode 100644 index 000000000..7481d5a2d --- /dev/null +++ b/cli/tests/testdata/jsx/deno-jsxdev-import-map.jsonc @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "jsx": "react-jsxdev", + "jsxImportSource": "jsx" + } +} diff --git a/cli/tests/testdata/jsx/deno-jsxdev.jsonc b/cli/tests/testdata/jsx/deno-jsxdev.jsonc new file mode 100644 index 000000000..ae5bdf9f1 --- /dev/null +++ b/cli/tests/testdata/jsx/deno-jsxdev.jsonc @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "jsx": "react-jsxdev", + "jsxImportSource": "http://localhost:4545/jsx" + } +} diff --git a/cli/tests/testdata/jsx/import-map.json b/cli/tests/testdata/jsx/import-map.json new file mode 100644 index 000000000..baab76f20 --- /dev/null +++ b/cli/tests/testdata/jsx/import-map.json @@ -0,0 +1,6 @@ +{ + "imports": { + "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts", + "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts" + } +} diff --git a/cli/tests/testdata/jsx/jsx-dev-runtime/index.ts b/cli/tests/testdata/jsx/jsx-dev-runtime/index.ts new file mode 100644 index 000000000..15e2029c8 --- /dev/null +++ b/cli/tests/testdata/jsx/jsx-dev-runtime/index.ts @@ -0,0 +1,12 @@ +// deno-lint-ignore-file no-explicit-any +export function jsx( + _type: any, + _props: any, + _key: any, + _source: any, + _self: any, +) {} +export const jsxs = jsx; +export const jsxDEV = jsx; +export const Fragment = Symbol("Fragment"); +console.log("imported", import.meta.url); diff --git a/cli/tests/testdata/jsx/jsx-runtime/index.ts b/cli/tests/testdata/jsx/jsx-runtime/index.ts new file mode 100644 index 000000000..15e2029c8 --- /dev/null +++ b/cli/tests/testdata/jsx/jsx-runtime/index.ts @@ -0,0 +1,12 @@ +// deno-lint-ignore-file no-explicit-any +export function jsx( + _type: any, + _props: any, + _key: any, + _source: any, + _self: any, +) {} +export const jsxs = jsx; +export const jsxDEV = jsx; +export const Fragment = Symbol("Fragment"); +console.log("imported", import.meta.url); |
