We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import React from "https://esm.sh/react@19.0.0"
It will load https://esm.sh/stable/react@19.0.0/denonext/react.mjs, but script include code 'import __Process$ from "node:process"' It should load https://esm.sh/react@19.0.0/es2022/react.mjs, the script has no such problem.
Why https://esm.sh/react@19.0.0 redirect to https://esm.sh/stable/react@19.0.0/denonext/react.mjs?
PS: my solution
import esbuild from "https://deno.land/x/esbuild@v0.24.2/mod.js" import { denoPlugins } from "jsr:@luca/esbuild-deno-loader@0.11.1" const denoJson = await Deno.readTextFile("deno.json") const imports = JSON.parse(denoJson).imports const importMapURL = 'data:application/json,' + JSON.stringify({ imports: Object.assign({ "react": "https://esm.sh/react@19.0.0/es2022/react.mjs", "react-dom/client": "https://esm.sh/react-dom@19.0.0/es2022/client.mjs" }, imports) }) if (Deno.args[0] === "dev") { const ctx = await esbuild.context({ plugins: [...denoPlugins({ importMapURL })],
The text was updated successfully, but these errors were encountered:
For me this worked
// deno.json { "imports": { "react": "npm:react@19.0.0" } }
// src/react.d.ts declare module "react" { // @deno-types="npm:@types/react@19.0.8" import React from "npm:react@19.0.0"; export default React; }
And then simply import
import React from "react";
Sorry, something went wrong.
No branches or pull requests
It will load https://esm.sh/stable/react@19.0.0/denonext/react.mjs, but script include code 'import __Process$ from "node:process"'
It should load https://esm.sh/react@19.0.0/es2022/react.mjs, the script has no such problem.
Why https://esm.sh/react@19.0.0 redirect to https://esm.sh/stable/react@19.0.0/denonext/react.mjs?
PS: my solution
The text was updated successfully, but these errors were encountered: