Remove OSX \x00 workaround (#1901)

* Remove OSX \x00 workaround

* Adds a changeset
This commit is contained in:
Matthew Phillips 2021-11-19 10:23:21 -05:00 committed by GitHub
parent 41c6a772a2
commit 3b511059b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Fix for OSX .astro file corruption

View file

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