Please provide the environment you discovered this bug in.
I couldn't create a stackblitz, but here is an easy way to reproduce:
Run npx create-nx-workspace (Choose Angular / Integrated monorepo / esbuild / sass / no ssr / no e2e / skip)
Run npm install && npm install -D @analogjs/platform
Run npx nx generate @analogjs/platform:init --project [your-project-name]
In "apps/[your-project-name]/vite.config.ts", set base: '/example'
In "apps/[your-project-name]/src/index.html" set <base href="/example" />
Serve your project "nx serve [your-project-name]
Open the app in a browser, then try modifying "apps/[your-project-name]/src/app/app.component.html", the page won't refresh
BONUS: saving the component.ts will actually refresh the page
Which area/package is the issue in?
vite-plugin-angular
Description
When setting a base URL in the vite config and index.html file, HMR stops working properly for HTML templates in separate files. This is annoying, as it forces us to restart the app every time.
Please provide the exception or error you saw
No response
Other information
When handling hot updates, the HTML file's importers field is missing the corresponding component.ts (thus, component.ts is not invalidated when modifying the HTML).
I would be willing to submit a PR to fix this issue
Please provide the environment you discovered this bug in.
I couldn't create a stackblitz, but here is an easy way to reproduce:
npx create-nx-workspace
(Choose Angular / Integrated monorepo / esbuild / sass / no ssr / no e2e / skip)npm install
&&npm install -D @analogjs/platform
npx nx generate @analogjs/platform:init --project [your-project-name]
base: '/example'
<base href="/example" />
Which area/package is the issue in?
vite-plugin-angular
Description
When setting a
base
URL in the vite config and index.html file, HMR stops working properly for HTML templates in separate files. This is annoying, as it forces us to restart the app every time.Please provide the exception or error you saw
No response
Other information
When handling hot updates, the HTML file's
importers
field is missing the corresponding component.ts (thus, component.ts is not invalidated when modifying the HTML).I would be willing to submit a PR to fix this issue