summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/npm/sub_paths/main.jsx
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-08-24 11:25:32 -0400
committerGitHub <noreply@github.com>2022-08-24 11:25:32 -0400
commit684aabbc252fe895e8f5de82c5fa4b7b6290f3ea (patch)
tree4bc64d132f118f0a1265d323c5e569d221a65437 /cli/tests/testdata/npm/sub_paths/main.jsx
parenta4cc09447e73d27b15201e7240fa056f06e34b9f (diff)
feat: support subpaths in npm package references (#15578)
Diffstat (limited to 'cli/tests/testdata/npm/sub_paths/main.jsx')
-rw-r--r--cli/tests/testdata/npm/sub_paths/main.jsx8
1 files changed, 8 insertions, 0 deletions
diff --git a/cli/tests/testdata/npm/sub_paths/main.jsx b/cli/tests/testdata/npm/sub_paths/main.jsx
new file mode 100644
index 000000000..0c712b9ff
--- /dev/null
+++ b/cli/tests/testdata/npm/sub_paths/main.jsx
@@ -0,0 +1,8 @@
+import React from "npm:react@18.2.0";
+import { renderToString } from "npm:react-dom@18.2.0/server";
+
+function App({ name }) {
+ return <div>Hello {name}!</div>;
+}
+
+console.log(renderToString(<App name="World" />));