-
Notifications
You must be signed in to change notification settings - Fork 0
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
Support new React Interface #44
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very intresting @SchrodingersGat !
@matmair @wolflu05 question for you guys. I have had to "hack" something into # Copy the compiled frontend files into the 'static' directory
# Required for MANIFEST.in to work correctly
here = pathlib.Path(__file__).parent.absolute()
# Copy the compiled frontend files into the 'static' directory
src_dir = here.joinpath('frontend/dist/static').resolve()
dst_dir = here.joinpath('inventree_wireviz/static').resolve()
if src_dir.exists():
print("Copying frontend files from", src_dir, "to", dst_dir)
shutil.copytree(src_dir, dst_dir, dirs_exist_ok=True) The reason for this is that the Here is the contents of
So, to appear at This works, but is a bit of a kludge and I'd like to avoid this step if possible. It also makes documenting the process (for other plugin developers) a bit tricker. Any ideas on how this might be improved? |
You can specify the bundle out dir in vite with the rollup options, so that the bundle is directly saved in the static folder. An other option would be to define a manually cp step in the package.json in the build script. (Something like: "scripts": {
"build": "vite build && cp dist/ static/" Of course you need the correct paths here) |
@wolflu05 thanks, that helped. The workflow is much cleaner now :) |
This PR is a major update to the plugin, to support the modern react interface.
TODO