Open stevenengland opened 8 months ago
I implemented that PR
I also created new adapters using the code base from this PR for TypeScript and for JavaScript as well. Both succeed. The newly created adapters then build fine. I was also able to start a dev-server instance for the newly created adapters. And now there comes the BUT.
In my dev environments, when I open the settings page of the adapter or the tab of the adapter, the content needs minutes to load. But then it loads the correct content and styled content. No errors in the console (except websocket reconnects) but one warning that made me curious. Here is a usual log containing this one. There it says:
"It looks like there are several instances of @mui/styles
initialized in this application.
This may cause theme propagation issues, broken class names, specificity issues, and makes your application bigger without a good reason."
Maybe this is the reason, why the loading process takes that long? I have no idea so far how to determine where those 2 instances are originating from. I must admit that I was am not a React user until now in combination with ioB.
Could anybody use this PR code to create a new adapter and check if the loading times in a dev-server instance are also as huge as in my dev-server instance?
Update: I recently recognized that the warnings and the slow loading only appear if the dev-server that is used for testing spins up a browser sync for HTML configuration. If it is set to jsonConfig there is no problem at all...
I've had the issues with slow loading before. Seems to be some kind of incompatibility with the websocket proxy in dev-server and the self-written websocket server in iobroker that don't play along well.
I'll try to look at the PR soon. My time is pretty limited right now. Thanks for your work!
Before merging I guess this one should be closed beforehand: https://github.com/ioBroker/dev-server/issues/475
BrowserSync from the dev-server
in combination with adapter-react-v5
causes this loading issues.
PR Checklist:
npm run build
npm test
.github/create_templates.ts
)docs/updates
explaining what the user needs to do when manually updating an existing projectCHANGELOG.md
(referencing the migration description and this PR or the issue you fixed)Description:
This PR solves the issue https://github.com/ioBroker/create-adapter/issues/1095 by switching from adapter-react to adapter-react-v5.