[Bug] when I tried to open the UI page, the service reported a 404 error
Desc
Today I added a menu field to the manifest and added commands to it:
And when I finish my code and run it:
I found that every time I try to open the plugin UI, a web server-side 404 error appears directly:
Just one more piece of information, this is a monorepo project
Thank you for reporting this. Would you mind posting a screenshot of the part of the manifest that has the ui and main fields? And then I should be able to take it from there.
Thanks again!
I have identified the key issue.
Currently, there are no issues with using
tmp/index.html in the code in single repository mode. But when in the monorepo repository, as a sub repository, plugma may be installed in the outermost node_modules, which can cause the position of the tmp folder to be abnormal and result in the inability to find the tmp/index.html file during actual code execution
This is a pr to fix it: #48
Since Rollup does not accept relative or absolute paths, I chose to fix this issue by copying the folder to the correct path
Thank you I'll review your PR in the next couple of weeks.
I was just reviewing your PR and I wondered if you had an example monorepo of this you could share? It would be useful to be able to test and also to see how you're using Plugma with a monorepo. Many thanks!
I'll prepare a demo later.👌In fact, I started with the initial project of turbo + pnpm
Hello, I'm sorry. I tried using a demo and found that it couldn't be replicated. A strange phenomenon is that not all times Monorepo installs the plugin on the outer layer. I can only replicate it in my company's project, but I don't have time to desensitize the company's project framework and make a demo at the moment.
Ok thanks. We will be release a new version soon, so I'll try creating a test case when we do to see if the issue still exists.
Hi @GrinZero, I just wanted to let you know I'm able to recreate this issue now. When I get time I'll look at the implementation again and see if I can apply it to the next release.
I think this should be fixed in v2. If anyone notices the same issue in v2, feel free to comment.