[ ] yes (bugfixes and features will not be merged without tests)
[x] no
Breaking Changes?
[ ] yes (breaking changes will not be merged unless absolutely necessary)
[x] no
If yes, please include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.
List any relevant issue numbers:
Description
This PR resolves an issue with email preview --build-path where vite creates a production build for deployment. With using the as: 'url' method of import.meta.glob to get the file paths of the templates loaded in production, we're given back completely different values than running in dev. Many of those values are base64 octet data urls, which is useless for our needs. The clue to a fix was the relative path that vite was using. Calculating that ourselves and injecting it into the bundle gave us something that we could use in both prod and dev preview apps.
Component / Package Name:
This PR contains:
Are tests included?
Breaking Changes?
If yes, please include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.
List any relevant issue numbers:
Description
This PR resolves an issue with
email preview --build-path
where vite creates a production build for deployment. With using theas: 'url'
method ofimport.meta.glob
to get the file paths of the templates loaded in production, we're given back completely different values than running in dev. Many of those values are base64 octet data urls, which is useless for our needs. The clue to a fix was the relative path that vite was using. Calculating that ourselves and injecting it into the bundle gave us something that we could use in both prod and dev preview apps.