Skip to content

Commit

Permalink
fix: context import types
Browse files Browse the repository at this point in the history
  • Loading branch information
ido-pluto committed Dec 18, 2023
1 parent 720bf76 commit 70dd270
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/context/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Allow you to add extra props without the need to manually add them every time
`layouts/Layout.astro`
```astro
---
import Context from '@astro-utils/context/Context.astro';
import Context from '@astro-utils/context/context.js';
function consoleIt(){
console.log('Hi');
Expand Down
5 changes: 5 additions & 0 deletions packages/context/context.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Context from './Context.astro';
import getContext, {asyncContext} from './dist/index';

export {getContext, asyncContext};
export default Context;
4 changes: 3 additions & 1 deletion packages/context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@
"dist/*",
"README.md",
"Context.astro",
"context.ts",
"LICENSE"
],
"main": "./dist/index.js",
"exports": {
".": "./dist/index.js",
"./Context.astro": "./Context.astro"
"./Context.astro": "./Context.astro",
"./context.js": "./context.js"
},
"devDependencies": {
"astro": "^4.0.6",
Expand Down

0 comments on commit 70dd270

Please sign in to comment.