Closed
Description
Please provide the environment you discovered this bug in.
Couldn't create a separate env with this problem
Which area/package is the issue in?
vite-plugin-angular
Description
We have a strange bug that didn't happen in one of the newly set up projects in our nx monorepo that uses vite-plugin-angular for angular storybook, but when we've migrated other projects to it we're experiencing hmr issue, on every change of the source code storybook shows this error: "Cannot read properties of undefined (reading 'getMeta')" that originates from here https://github.com/analogjs/analog/blob/beta/packages/vite-plugin-angular/src/lib/utils/hmr-candidates.ts#L141, and it seems that conditional chaining there solves the problem:
const meta = compiler?.getMeta(updatedNode);
Do you have any insights on what might cause this problem? And do you think this would be ok as a fix to this problem?
Please provide the exception or error you saw
Cannot read properties of undefined (reading 'getMeta')
Other information
No response
I would be willing to submit a PR to fix this issue
- Yes
- No