diff --git a/.vscode/deno_resolve_npm_imports.json b/.vscode/deno_resolve_npm_imports.json
index e6490a679e1..8444a962762 100644
--- a/.vscode/deno_resolve_npm_imports.json
+++ b/.vscode/deno_resolve_npm_imports.json
@@ -10,4 +10,4 @@
"mime": "https://esm.sh/mime@3.0.0",
"@remix-run/server-runtime": "https://esm.sh/@remix-run/server-runtime@1.4.3"
}
-}
\ No newline at end of file
+}
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 402c21f23d7..885b1c44c63 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,7 +1,5 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
- "deno.enablePaths": [
- "./packages/remix-deno/",
- ],
+ "deno.enablePaths": ["./packages/remix-deno/"],
"deno.importMap": "./.vscode/deno_resolve_npm_imports.json"
}
diff --git a/docs/decisions/0001-use-npm-to-manage-npm-dependencies-for-deno-projects.md b/docs/decisions/0001-use-npm-to-manage-npm-dependencies-for-deno-projects.md
index 8213d5a6b0c..35abb31336c 100644
--- a/docs/decisions/0001-use-npm-to-manage-npm-dependencies-for-deno-projects.md
+++ b/docs/decisions/0001-use-npm-to-manage-npm-dependencies-for-deno-projects.md
@@ -15,6 +15,7 @@ Deno has three ways to manage dependencies:
Additionally, NPM packages can be accessed as Deno modules via [Deno-friendly CDNs](https://deno.land/manual/node/cdns#deno-friendly-cdns) like https://esm.sh .
Remix has some requirements around dependencies:
+
- Remix treeshakes dependencies that are free of side-effects.
- Remix sets the environment (dev/prod/test) across all code, including dependencies, at runtime via the `NODE_ENV` environment variable.
- Remix depends on some NPM packages that should be specified as peer dependencies (notably, `react` and `react-dom`).
@@ -86,6 +87,7 @@ Remix will not yet support import maps.
Users may configure an import map for the [Deno extension for VS Code](denoland.vscode-deno) to enable type hints for NPM-managed dependencies within their Deno editor:
`.vscode/resolve_npm_imports_in_deno.json`
+
```json
{
"// This import map is used solely for the denoland.vscode-deno extension.": "",
@@ -102,9 +104,10 @@ Users may configure an import map for the [Deno extension for VS Code](denoland.
```
`.vscode/settings.json`
+
```json
{
"deno.enable": true,
"deno.importMap": "./.vscode/resolve_npm_imports_in_deno.json"
}
-```
\ No newline at end of file
+```
diff --git a/integration/helpers/deno-template/app/entry.server.tsx b/integration/helpers/deno-template/app/entry.server.tsx
index 5aff7ec014f..8ab0f9f7a18 100644
--- a/integration/helpers/deno-template/app/entry.server.tsx
+++ b/integration/helpers/deno-template/app/entry.server.tsx
@@ -7,10 +7,10 @@ export default function handleRequest(
request: Request,
responseStatusCode: number,
responseHeaders: Headers,
- remixContext: EntryContext,
+ remixContext: EntryContext
) {
- const markup = renderToString(
- ,
+ let markup = renderToString(
+
);
responseHeaders.set("Content-Type", "text/html");
diff --git a/templates/deno/package.json b/templates/deno/package.json
index d1e2304d5d0..fc89fb07dde 100644
--- a/templates/deno/package.json
+++ b/templates/deno/package.json
@@ -11,6 +11,12 @@
"lint": "deno lint --ignore=node_modules",
"format": "deno fmt --ignore=node_modules"
},
+ "dependencies": {
+ "@remix-run/deno": "*",
+ "@remix-run/react": "*",
+ "react": "^17.0.2",
+ "react-dom": "^17.0.2"
+ },
"devDependencies": {
"@remix-run/dev": "*",
"cross-env": "^7.0.3",
@@ -18,11 +24,5 @@
},
"engines": {
"node": ">=14"
- },
- "dependencies": {
- "@remix-run/deno": "*",
- "@remix-run/react": "*",
- "react": "^17.0.2",
- "react-dom": "^17.0.2"
}
}