-
Notifications
You must be signed in to change notification settings - Fork 17
Enable exports #265
New issue
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
base: main
Are you sure you want to change the base?
Enable exports #265
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,6 +2,17 @@ | |||||||||||||||||||||||
| "name": "explore-site", | ||||||||||||||||||||||||
| "version": "1.0.0", | ||||||||||||||||||||||||
| "private": true, | ||||||||||||||||||||||||
| "exports": { | ||||||||||||||||||||||||
| ".": "./app/page.jsx", | ||||||||||||||||||||||||
| "./components/*": "./components/*.jsx", | ||||||||||||||||||||||||
| "./components/nav/*": "./components/nav/*.jsx", | ||||||||||||||||||||||||
| "./components/inspector_panel/*": "./components/inspector_panel/*.jsx", | ||||||||||||||||||||||||
| "./components/map": "./components/map/index.js", | ||||||||||||||||||||||||
| "./components/map/*": "./components/map/*", | ||||||||||||||||||||||||
| "./lib/*": "./lib/*.js", | ||||||||||||||||||||||||
| "./lib/util/*": "./lib/util/*.js", | ||||||||||||||||||||||||
| "./app/globals.css": "./app/globals.css" | ||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||
|
Comment on lines
+5
to
+15
|
||||||||||||||||||||||||
| "exports": { | |
| ".": "./app/page.jsx", | |
| "./components/*": "./components/*.jsx", | |
| "./components/nav/*": "./components/nav/*.jsx", | |
| "./components/inspector_panel/*": "./components/inspector_panel/*.jsx", | |
| "./components/map": "./components/map/index.js", | |
| "./components/map/*": "./components/map/*", | |
| "./lib/*": "./lib/*.js", | |
| "./lib/util/*": "./lib/util/*.js", | |
| "./app/globals.css": "./app/globals.css" | |
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The exported components rely heavily on the Next/jsconfig path alias
@/…(e.g.,import … from "@/components/..."). When this package is consumed from another repo (as the PR description suggests), those imports will typically resolve against the consumer app’s@alias (or not resolve at all), causing build/runtime failures. To make these exports usable as a library, switch internal imports to relative paths (or to this package’s own subpath exports likeexplore-site/components/...) or add a build step that rewrites/compiles these imports for distribution.