You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use vite's built-in package.json loading to inline names and versions (#9494)
This eliminates the need for embroider macros to provide packages their own name and version. That is not a good use case for macros, since it can never change post-publication.
The prepublication Vite build here has built-in support for this, and it does exactly what one would want, inlining only the strings that were imported from package.json.
(Also, this is being motivated by the fact that addon-main.js in v2 addons in not guaranteed to be run by embroider. It's a classic file that does nothing under our Vite build. Having an alternative that allows apps (not addons) to manipulate the macros config is planned as a blocker for releasing the vite blueprint.)
This PR is only a WIP, because I suspect the package publication process here needs to change to ensure that `vite build` gets run after each of the mirror package names and/or versions gets set. There's a lot going on in the publication step, so I figured it would be best to just open this for discussion first.
0 commit comments