Skip to content

Commit

Permalink
updated: Readme register hook documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
GianlucaGuarini committed Apr 26, 2024
1 parent 005161e commit 68744c2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ npm i @riotjs/register @riotjs/compiler

You can enable the import of `.riot` files as follows:

```shell
node --loader @riotjs/register your-app.js
```js
import { pathToFileURL } from "node:url";

register('@riotjs/register', pathToFileURL('./'))
```

This loader supports only [`type=module`](https://nodejs.org/api/packages.html#packagejson-and-file-extensions) projects.
Expand Down

0 comments on commit 68744c2

Please sign in to comment.