Skip to content

Commit

Permalink
use hack
Browse files Browse the repository at this point in the history
  • Loading branch information
codehz committed Jul 28, 2024
1 parent b396c8c commit 2365703
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,14 @@ export async function build({
build.onLoad(
{ namespace: "client", filter: /\.ts[x]$/ },
async ({ path, loader }) => {
return { contents: await Bun.file(path).text(), loader };
const contents = await Bun.file(path).text();
return {
contents: contents.replaceAll(
/\/\/\s*@server-side[^\n\S]*\n[^\n]+\n/g,
""
),
loader,
};
}
);
},
Expand Down

0 comments on commit 2365703

Please sign in to comment.