`client` and `theme` are not `exported` from `exports` field in `package.json`
See original GitHub issueHi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch vitepress@1.0.0-alpha.4
for the project I’m working on.
Here is the diff that solved my problem:
diff --git a/node_modules/vitepress/package.json b/node_modules/vitepress/package.json
index bc579de..68da516 100644
--- a/node_modules/vitepress/package.json
+++ b/node_modules/vitepress/package.json
@@ -12,7 +12,9 @@
"import": "./dist/node/index.js",
"require": "./dist/node-cjs/index.cjs"
},
- "./dist/client/*": "./dist/client/*"
+ "./dist/client/*": "./dist/client/*",
+ "./client": "./client.d.ts",
+ "./theme": "./theme.d.ts"
},
"bin": {
"vitepress": "bin/vitepress.js"
This issue body was partially generated by patch-package.
Issue Analytics
- State:
- Created a year ago
- Comments:15 (15 by maintainers)
Top Results From Across the Web
Node: Exports field in package.json is not working
I couldn't get exports to work. This is how I worked around it. I had to change the build + publish only the...
Read more >Package exports - webpack
The exports field in the package.json of a package allows to declare which module should be used when using module requests like import...
Read more >import - JavaScript - MDN Web Docs - Mozilla
The static import declaration is used to import read-only live bindings which are exported by another module. The imported bindings are ...
Read more >Requested module does not provide export named 'default'
To solve the error "The requested module does not provide an export named default", use the `default` keyword when exporting a value from...
Read more >Example Code To Simplify Your Imports and Exports
Unique plugin or theme requirements often necessitate such code. ... If export file could not be found, write to error log. error_log("Could not...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is fixed on vite 3 branch.
Glad to hear.
@brc-dd
Besides, do you think is there any chance how can I apply to be a member or collaborator or vite/vitepress groups? I’d like to spend more time working on vite/vitepress in the next few days.