We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The docs shows Code Hike supports import external code, but it actually not work.
https://codehike.org/docs/concepts/code#importing-code-from-a-file-into-a-codeblock
First create a new project,
npx create-next-app -e https://github.com/code-hike/v1-starter
Then an external file app/external.js,
app/external.js
console.log("Hello, world!")
Then import it from app/page.mdx, use !from syntax:
app/page.mdx
!from
```js !from "./external.js" ```
You will see an error:
./app/page.mdx Error: page.mdx:Error: Code Hike couldn't resolve this annotation: !from /xxx/app/page.mdx /xxx/app/"./external.js" doesn't exist. at async Promise.all (index 0)
This is because file.history is empty (line 27,32,48), but I don't know why.
file.history
codehike/packages/codehike/src/mdx/0.import-code-from-path.ts
Lines 27 to 54 in 7e7b78d
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The docs shows Code Hike supports import external code, but it actually not work.
https://codehike.org/docs/concepts/code#importing-code-from-a-file-into-a-codeblock
Reproduce
First create a new project,
Then an external file
app/external.js
,Then import it from
app/page.mdx
, use!from
syntax:You will see an error:
This is because
file.history
is empty (line 27,32,48), but I don't know why.codehike/packages/codehike/src/mdx/0.import-code-from-path.ts
Lines 27 to 54 in 7e7b78d
The text was updated successfully, but these errors were encountered: