-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
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
How to import other extension file with Deno. #20469
Comments
As far as I know, loader is not currently supported. You can try using the following code to load yaml import { parse } from "https://deno.land/std@0.201.0/yaml/mod.ts";
const configText = await Deno.readTextFile("./config.yaml");
const config = parse(configText);
console.log(config); |
@markthree 目的不太一样, 因为 deno 支持 bundle, 使用 readTextFile 不能将 config.yaml 也加入到 bundle 中, 而 preload 的插件可以将 config.yaml 处理成 ts 可执行的代码并加入到 bundle, 类似 webpack 可以把 png 等文件变成 base64 加入到 js 产物. deno 支持直接 run 一个远程 js 链接来启动 server, 但是大多数 server 都是包含 static file 的, 所以 deno deploy 只能靠支持 github 仓库整个 clone 来实现. 如果支持了 preload, 那么 bundle 后的产物就可以完全的做到 run 一个远程 js 路径. |
嗯嗯,deno 并不支持这种 可以试试用 Hmm, Deno does not support this type of |
This is not currently supported. #1739 |
Like: https://bun.sh/docs/runtime/plugins
I need a loader at preload step.
The text was updated successfully, but these errors were encountered: