Skip to content

Commit

Permalink
fix: @astrojs/compiler types
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate Moore committed Oct 21, 2021
1 parent 96111b4 commit 46d6831
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/astro/src/vite-plugin-astro/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ export default function astro({ config, devServer }: AstroPluginOptions): vite.P
if (!attrs || !attrs.lang) return null;
const result = await transformWithVite(value, attrs, id, viteTransform);
if (!result) {
return result;
// TODO: compiler supports `null`, but types don't yet
return (result as any);
}
return { code: result.code, map: result.map?.toString() }
},
Expand Down

0 comments on commit 46d6831

Please sign in to comment.