Skip to content

Commit

Permalink
fix(player): improve vite plugin hmr
Browse files Browse the repository at this point in the history
  • Loading branch information
mihar-22 committed Apr 22, 2024
1 parent 7283344 commit be19840
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/react/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ if (!MODE_TYPES) {
chokidar.watch('player/styles/**').on('all', (_, path) => {
if (path !== 'player/styles/default/theme.css') buildDefaultTheme();
});

fsExtra.copyFile('package.json', 'dist-npm/package.json');
}
}

Expand Down
2 changes: 2 additions & 0 deletions packages/vidstack/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ if (!MODE_TYPES) {
await buildDefaultTheme();
}
});

fsExtra.copyFile('package.json', 'dist-npm/package.json');
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/vidstack/src/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ function generateElementImports(
}

function diff(a: Set<any> | undefined, b: Set<any> | undefined, key: string) {
return a?.has(key) !== b?.has(key);
return !!a && !!b && a.has(key) && b.has(key);
}

function isSetsEqual(a: Set<any> | undefined, b: Set<any> | undefined): boolean {
Expand Down

0 comments on commit be19840

Please sign in to comment.