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 });