diff options
Diffstat (limited to 'docs/api.md')
-rw-r--r-- | docs/api.md | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/api.md b/docs/api.md index 205d4d92a..05b722747 100644 --- a/docs/api.md +++ b/docs/api.md @@ -179,9 +179,9 @@ export default function () { Astro aims to be compatible with multiple JavaScript runtimes in the future. This includes [Deno](https://deno.land/) and [Cloudflare Workers](https://workers.cloudflare.com/) which do not support Node builtin modules such as `fs`. We encourage Astro users to write their code as cross-environment as possible. -Due to that, you cannot use Node modules that you're familiar with such as `fs` and `path`. Our aim is to provide alternative built in to Astro. If you're use case is not covered please let us know. +Due to that, you cannot use Node modules that you're familiar with such as `fs` and `path`. Our aim is to provide alternative built in to Astro. If you're use case is not covered please let us know. -However, if you *really* need to use these builtin modules we don't want to stop you. Node supports the `node:` prefix for importing builtins, and this is also supported by Astro. If you want to read a file, for example, you can do so like this: +However, if you _really_ need to use these builtin modules we don't want to stop you. Node supports the `node:` prefix for importing builtins, and this is also supported by Astro. If you want to read a file, for example, you can do so like this: ```jsx --- @@ -192,4 +192,5 @@ const json = await fs.readFile(url, 'utf-8'); const data = JSON.parse(json); --- -<span>Version: {data.version}</span>
\ No newline at end of file +<span>Version: {data.version}</span> +``` |