Skip to content

Commit

Permalink
fix: bad delete
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Apr 10, 2024
1 parent ee64988 commit acfc736
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/react-server/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ function vitePluginUseClient(): PluginOption {
const transformPlugin: Plugin = {
name: vitePluginUseClient.name + ":transform",
async transform(code, id, _options) {
manager.clientReferences.delete(id);
if (this.environment?.name === "react-server") {
manager.clientReferences.delete(id);
if (/^("use client")|('use client')/.test(code)) {
manager.clientReferences.add(id);
const ast = await parseAstAsync(code);
Expand Down

0 comments on commit acfc736

Please sign in to comment.