Skip to content

Commit

Permalink
Fix invalid invocation of ctx function
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeckem committed Jul 23, 2024
1 parent 6da3126 commit 1b84a49
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .changeset/thick-bees-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@open-pioneer/vite-plugin-pioneer": patch
---

Fix a problem that may produce dev server errors on newer versions of vite:

```
11:11:21 AM [vite] Internal server error: Failed to resolve services entry point for package $DIR/src/samples/showcase/showcase-app
Caused by: Cannot read properties of undefined (reading 'resolveId')
```
4 changes: 2 additions & 2 deletions packages/vite-plugin/src/codegenPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ function buildMetadataContext(
manualDeps: Map<string, Set<string>>
): MetadataContext {
return {
warn: ctx.warn,
resolve: ctx.resolve,
warn: (...args) => ctx.warn(...args),
resolve: (...args) => ctx.resolve(...args),
addWatchFile: (id) => {
if (devServer) {
// TODO: Is there a better way? We want to trigger a hot reload when
Expand Down

0 comments on commit 1b84a49

Please sign in to comment.