Skip to content

Commit aa39050

Browse files
authoredMay 17, 2022
feat(compiler): officially support Deno (#3117)
* docs(decisions): use `npm` to manage NPM dependencies for Deno projects * refactor(compiler): do not bundle url imports keep url imports as-is in build output so that each runtime can handle url imports in their own way. for example, deno will download dependencies from url imports at runtime. the browser will download dependendencies from url imports on-demand. node will simply throw an error when encountering a url import. since we will recommend to use npm/node_modules for dependency management (even for deno), the only url imports we expect are for deno imports on the server from https://deno.land or from Deno-friendly CDNs like https://esm.sh . * feat(compiler): can build deno-compatible server bundle * feat(@remix-run/deno): add server runtime package for deno * feat(templates/deno): use npm-managed dependencies * test(replace-remix-imports): fix `shell.grep` call previously, `shell.grep` was being called with the `-r` option, which it does not recognize, resulting in an exit ode of 1. we incorrectly interpreted that as `grep` finishing the search without finding matches. instead, the `shell.grep` call was crashing. now we correctly pass a list of files to `shell.grep` without the `-r` option. * test(compiler): browser and server bundles for deno * refactor(@remix-run/deno): throw custom error when static files are not found so that `createRequestHandlerWithStaticFiles` is more portable across runtimes and adapters
1 parent be4a25e commit aa39050

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+786
-237
lines changed
 

‎.eslintignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
**/tests/__snapshots/
33
**/node_modules/
44
!.eslintrc.js
5-
templates/deno
65
.tmp
76
/playground
87
**/__tests__/fixtures
8+
9+
# deno
10+
packages/remix-deno
11+
templates/deno

‎.vscode/deno_resolve_npm_imports.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"// Resolve NPM imports for `packages/remix-deno`.": "",
3+
4+
"// This import map is used solely for the denoland.vscode-deno extension.": "",
5+
"// Remix does not support import maps.": "",
6+
"// Dependency management is done through `npm` and `node_modules/` instead.": "",
7+
"// Deno-only dependencies may be imported via URL imports (without using import maps).": "",
8+
9+
"imports": {
10+
"mime": "https://esm.sh/mime@3.0.0",
11+
"@remix-run/server-runtime": "https://esm.sh/@remix-run/server-runtime@1.4.3"
12+
}
13+
}

0 commit comments

Comments
 (0)
Please sign in to comment.