-
Notifications
You must be signed in to change notification settings - Fork 7
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
doesnt work #3
Comments
Hi Chartieer, thanks for opening the issue. I'm afraid that the setup and configuration are subject to the exact version you use for Stencil, @Nxext/stencil, @stencil/react-output-target, and Nx itself. I just ran In any case, I will update the repository to use the latest versions of all the packages, because once again, some things have changed in the meanwhile. I'll let you know when I'm done and would be happy if you could cross-check that everything is working then. Thank you for your time. |
I commened on you medium post. I got it up and running. |
´changes: import React from 'react';
import ReactDOM from 'react-dom';
import { defineCustomElements } from 'ui-components/loader';
import App from './app/app';
ReactDOM.render(<App />, document.getElementById('root'));
defineCustomElements(window); And in workspace.json und ui-components Workspace "serve": {
"builder": "@nxext/stencil:build",
"options": {
"projectType": "library",
"configPath": "libs/ui-components/stencil.config.ts",
"serve": true,
"watch": true
}
} Then you can start app with. yarn start Packages are are updated to latest versions. |
Hi @Mobiletainment, did you got any progress on that? |
Hi there. I apologize for leaving this idle for so long. I didn't have time to resolve this properly, but I will plan some time for Sunday to update the project and make it nice again. Sorry for the inconvenience. |
Hi @Chartieer and @davidrock: I finally managed to look into the project again and ran into the issue that the library (which is specified as a dependency of the frontend) wasn't built when it was served. This resulted in the following error: Specifying the build order turned out to be a bit tricky, as Nx didn't allow me to easily specify commands that should be run before serving the project. Probably the easiest fix for that would have been to just commit the generated files into the repository, so that they can be correctly resolved without further ado, even without building them first. This would probably have also solved @Chartieer's problem with the component not being displayed, because a working example would be checked in. If it's not too late already, you can find the v2.0.0 release here: https://github.com/Mobiletainment/Nx-Stencil-React/releases/2.0.0 Thank you for opening the ticket. If he problem still persists, I'm happy to follow up on it |
I downloaded and extracted the v2.0.0 zip release and after running
|
I started reading your article and rebuild it as described, doesnt work for me.
Then i checkout the git, yarn + build the components yarn nx build:ui-components + yarn nx serve frontend1
doesnt work. Then I diff the git and the blogpost version, found there are some diffs e.g. the filepaths
and the Proxy path
I fizzle around a bit and finally got it compiled without error andd the my-component tag is in the markup but nothing is displayed ;-(
Normally there should be something like
Inside the index file of the ReactApp. I try to import but it doesn´t work for me.
I am wrong? Is the demo really working? maybe you miss out a step when you sayed "We can already use the ui-components-react package in our React app:" how?
thanks for your help
The text was updated successfully, but these errors were encountered: