You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.
Right now, sharing of React components through NPM should work. However, there's still some questions about how components would render images with paths that refer to resources in their own npm module folder. They may be relative to their JS file, but JS files are packaged (as they should be) into a monolithic build - the contents' relative image urls would be incorrect.
I'll experiment with the ability to use commonJS path resolution for image URLs. That way npm projects can also expose their own resources (useful when mixing in/composing components).
The reason why I suggest require() is because we can easily support it in react-page, but also because any React component deployed to to npm could work outside of react-page. Any node environment can implement custom handlers for image extensions such that it behaves exactly like react-page.
I'm looking for any solution satisfying:
Easily share components with anyone through NPM.
Relative image urls work in familiar way (commonJS require a strong candidate).
A reasonable solution can/should easily be implementable outside of react-page.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Right now, sharing of React components through NPM should work. However, there's still some questions about how components would render images with paths that refer to resources in their own npm module folder. They may be relative to their JS file, but JS files are packaged (as they should be) into a monolithic build - the contents' relative image urls would be incorrect.
I'll experiment with the ability to use commonJS path resolution for image URLs. That way npm projects can also expose their own resources (useful when mixing in/composing components).
The reason why I suggest
require()
is because we can easily support it inreact-page
, but also because any React component deployed to to npm could work outside ofreact-page
. Any node environment can implement custom handlers for image extensions such that it behaves exactly likereact-page
.I'm looking for any solution satisfying:
react-page
.The text was updated successfully, but these errors were encountered: