Open ralphwetzel opened 4 days ago
I'm thinking the result is better served into a /dist
folder? Rather than nested inside /ui
? I like /ui
being the source code only - thoughts?
I like
/ui
being the source code only - thoughts?
The reason I proposed to put it into /ui
was a similar one: All widget related stuff should stay in /ui
, whereas the rest of the structure is "standard NR". đŸ˜‰
Surely I can agree on your view either. Additionally, I'd propose to remove dist/*
from the files
section in package.json
:
All widget related stuff should stay in /ui, whereas the rest of the structure is "standard NR".
Good point, well presented. Will review and play with this tomorrow before merging, but provisionally, looks good.
Description
When building a widget for Dashboard-2,
vite
places the resulting file into the/resources
folder:https://github.com/FlowFuse/node-red-dashboard-2-ui-example/blob/a5f443e290a4d453dac46e6ad9b9845dcc5958d9/vite.config.js#L26-L27
Unfortunately, as it's documentation states,
This is unfortunate, as it deletes as well all (other) files existing in
/resources
, thus breaking the mechanism to provide additional files to load into the editor as extra resources.Change Proposal
/resources
,vite
shall build intoui/dist
directory./resources
.vite-plugin-static-copy
, added asdev-dependency
.vite.config.js
has to be renamed tovite.config.mjs
.package.json
, still pointing to aflowforge
repo, non-existing.Checklist