-
Notifications
You must be signed in to change notification settings - Fork 16
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
No support for CommonJS package types #375
Comments
FYI: we figured out how to import GCDS into a Remix CJS server, see remix.config.js. tldr: However, I will keep this issue open because I still think that providing |
One more comment that might be helpful. |
Thanks for raising this issue, we don't have much experience with Remix but will look into making integration into the framework easier. |
The problem I reported is not specific to Remix. It's integration with CommonJS builds. I haven't verified this blog post, but it does seem to sum up the problem and offer a potential solution: https://www.sensedeep.com/blog/posts/2021/how-to-create-single-source-npm-module.html. |
Thanks, we will definitely use that as a reference when we take a look at the CommonJs package |
Adding a comment here of a repository that uses remix: https://github.com/DTS-STN/canadian-dental-care-plan/tree/main/frontend |
For what it's worth, our project no longer uses CommonJS, so this repo isn't really relevant to this specific issue (anymore). 🤣 If you do need a remix project that uses CommonJS, I can deploy a stackblitz project or even create a small do-nothing project in my personal github account. |
@gregory-j-baker we may not get to fixing this issue soon, but a small do-nothing project will be helpful and appreciated! |
Just chatting a bit with @gregory-j-baker and in case someone else is trying to use GCDS with the latest remix, the configuration needed to get it to work is now in
|
Today I tried to integrate GCDS with my Remix application and ran into the following issue when Remix tried to render a component server-side:
The problem is that my custom server must be compiled as CommonJS (for technical reasons), so when it tries to render a GCDS component, it fails.
Have you considered shipping a hybrid package that contains both
.mjs
and.cjs
variants, so those of us stuck using CommonJS on the server can still use GCDS?The text was updated successfully, but these errors were encountered: