parse all documents as fragments now
This commit is contained in:
parent
b6398c4dbe
commit
1bc5b7b8bc
2 changed files with 2 additions and 1 deletions
|
@ -57,7 +57,7 @@ export default function astro({ config, devServer }: AstroPluginOptions): vite.P
|
|||
// use `sourcemap: "both"` so that sourcemap is included in the code
|
||||
// result passed to esbuild, but also available in the catch handler.
|
||||
tsResult = await transform(source, {
|
||||
as: isPage ? 'document' : 'fragment',
|
||||
as: 'fragment',
|
||||
projectRoot: config.projectRoot.toString(),
|
||||
site: config.buildOptions.site,
|
||||
sourcefile: id,
|
||||
|
|
|
@ -53,6 +53,7 @@ ${setup}`.trim();
|
|||
|
||||
// Transform from `.astro` to valid `.ts`
|
||||
let { code: tsResult } = await transform(astroResult, {
|
||||
as: 'fragment',
|
||||
projectRoot: config.projectRoot.toString(),
|
||||
site: config.buildOptions.site,
|
||||
sourcefile: id,
|
||||
|
|
Loading…
Reference in a new issue