From 3b511059b97156bfffccf48121ffe6041e7e95a3 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Fri, 19 Nov 2021 10:23:21 -0500 Subject: [PATCH] Remove OSX \x00 workaround (#1901) * Remove OSX \x00 workaround * Adds a changeset --- .changeset/serious-rocks-juggle.md | 5 +++++ packages/astro/src/vite-plugin-astro/index.ts | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 .changeset/serious-rocks-juggle.md diff --git a/.changeset/serious-rocks-juggle.md b/.changeset/serious-rocks-juggle.md new file mode 100644 index 000000000..8125dec52 --- /dev/null +++ b/.changeset/serious-rocks-juggle.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix for OSX .astro file corruption diff --git a/packages/astro/src/vite-plugin-astro/index.ts b/packages/astro/src/vite-plugin-astro/index.ts index 4ca062a2e..e6a2074e0 100644 --- a/packages/astro/src/vite-plugin-astro/index.ts +++ b/packages/astro/src/vite-plugin-astro/index.ts @@ -82,11 +82,6 @@ export default function astro({ config, devServer }: AstroPluginOptions): vite.P }, }); - // macOS fix: remove null chars generated by compiler - if (platform === 'darwin') { - tsResult.code = tsResult.code.replace(/\x00/g, ''); - } - // Compile `.ts` to `.js` const { code, map } = await esbuild.transform(tsResult.code, { loader: 'ts', sourcemap: 'external', sourcefile: id });