Skip to content

Commit

Permalink
docs: fix 70-packaging.md (#9254)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomoam authored Mar 1, 2023
1 parent 26316be commit 1d45113
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions documentation/docs/30-advanced/70-packaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ All relative file imports need to be fully specified, adhering to Node's ESM alg
```diff
-import { something } from './something';
+import { something } from './something/index.js';
```

If you are using TypeScript, you need to import `.ts` files the same way, but using a `.js` file ending, _not_ a `.ts` file ending. (This is a TypeScript design decision outside our control.) Setting `"moduleResolution": "NodeNext"` in your `tsconfig.json` or `jsconfig.json` will help you with this.

Expand Down

0 comments on commit 1d45113

Please sign in to comment.