Remove OSX \x00 workaround (#1901)
* Remove OSX \x00 workaround * Adds a changeset
This commit is contained in:
parent
41c6a772a2
commit
3b511059b9
2 changed files with 5 additions and 5 deletions
5
.changeset/serious-rocks-juggle.md
Normal file
5
.changeset/serious-rocks-juggle.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'astro': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix for OSX .astro file corruption
|
|
@ -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`
|
// Compile `.ts` to `.js`
|
||||||
const { code, map } = await esbuild.transform(tsResult.code, { loader: 'ts', sourcemap: 'external', sourcefile: id });
|
const { code, map } = await esbuild.transform(tsResult.code, { loader: 'ts', sourcemap: 'external', sourcefile: id });
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue