Skip to content
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

Subpath exports have absolute paths #674

Closed
mightyiam opened this issue Jun 14, 2020 · 1 comment · Fixed by #679
Closed

Subpath exports have absolute paths #674

mightyiam opened this issue Jun 14, 2020 · 1 comment · Fixed by #679

Comments

@mightyiam
Copy link
Contributor

snabbdom/package.json

Lines 8 to 27 in b34e9a9

"exports": {
"./helpers/attachto": "/es/helpers/attachto.js",
"./modules/attributes": "/es/modules/attributes.js",
"./modules/class": "/es/modules/class.js",
"./modules/dataset": "/es/modules/dataset.js",
"./modules/eventlisteners": "/es/modules/eventlisteners.js",
"./modules/hero": "/es/modules/hero.js",
"./modules/module": "/es/modules/module.js",
"./modules/props": "/es/modules/props.js",
"./modules/style": "/es/modules/style.js",
"./h": "/es/h.js",
"./hooks": "/es/hooks.js",
"./htmldomapi": "/es/htmldomapi.js",
"./is": "/es/is.js",
"./jsx": "/es/jsx.js",
"./snabbdom": "/es/snabbdom.js",
"./thunk": "/es/thunk.js",
"./tovnode": "/es/tovnode.js",
"./vnode": "/es/vnode.js"
},

Seems that they should be relative:
https://nodejs.org/api/esm.html#esm_subpath_exports

@mightyiam
Copy link
Contributor Author

> require('snabbdom/helpers/attachto')
Uncaught:
Error [ERR_INVALID_PACKAGE_TARGET]: Invalid "exports" target "/build/package/helpers/attachto.js" defined for './helpers/attachto' in the package config /home/shahar/temp/node_modules/snabbdom/package.json; targets must start with "./"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant