1
1
Fork
You've already forked wordpress
0

HMR vite flow #3

Open
opened 2026年03月02日 11:02:00 +01:00 by JoshuaCrewe · 0 comments

At the moment the build is using vite build --watch which is my preference overall. I don't want a development server required which needs the port being kept a track of. This is however how vite wants to work so it would be good to have this working

To get it working we are looking at :

  • Updating package.json to use vite watch
  • Figuring out what the path on the dev server the assets are served at (this seems basically impossible)
  • Create a PHP function to detect this mode and load via the above figured out URL
  • Mode detection is best by looking for the hot file (make sure this is output to somewhere)
  • Update index-asset-php plugin to work on both modes (closeBundle vs buildStart)
At the moment the build is using `vite build --watch` which is my preference overall. I don't want a development server required which needs the port being kept a track of. This is however how vite wants to work so it would be good to have this working To get it working we are looking at : - [ ] Updating package.json to use vite watch - [ ] Figuring out what the path on the dev server the assets are served at (this seems basically impossible) - [ ] Create a PHP function to detect this mode and load via the above figured out URL - [ ] Mode detection is best by looking for the hot file (make sure this is output to somewhere) - [ ] Update index-asset-php plugin to work on both modes (`closeBundle` vs `buildStart`)
Sign in to join this conversation.
No Branch/Tag specified
main
feature/native-blocks
No results found.
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JoshuaCrewe/wordpress#3
Reference in a new issue
JoshuaCrewe/wordpress
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?