Skip to content

Commit

Permalink
added debugging section to the README
Browse files Browse the repository at this point in the history
  • Loading branch information
hansoksendahl committed May 15, 2024
1 parent 0e78302 commit 5136b29
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,23 @@ const templates = {
const t = strix(templates)

const helloWorld = t('greeting', { name: 'world' } as const) // 'Hello, world!'
```
```

## Debugging

If you are using pnpm or any other package manager that hoists dependencies, or
if you are using symlinked packages, you may need to add the following to your
`tsconfig.json`:

```json
{
"compilerOptions": {
"preserveSymlinks": true
}
}
```

Due to the way that TypeScript resolves modules, the `strix` library may not be
able to find the templates if they are in a different package or if the package
is symlinked. Setting `preserveSymlinks` to `true` will ensure that the
templates and types are found.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@recon-struct/strix",
"version": "1.0.1",
"version": "1.0.2",
"module": "./src/index.ts",
"devDependencies": {
"@recon-struct/utility-types": "^1.3.4",
Expand Down

0 comments on commit 5136b29

Please sign in to comment.