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
|
// use `sourcemap: "both"` so that sourcemap is included in the code
|
||||||
// result passed to esbuild, but also available in the catch handler.
|
// result passed to esbuild, but also available in the catch handler.
|
||||||
tsResult = await transform(source, {
|
tsResult = await transform(source, {
|
||||||
as: isPage ? 'document' : 'fragment',
|
as: 'fragment',
|
||||||
projectRoot: config.projectRoot.toString(),
|
projectRoot: config.projectRoot.toString(),
|
||||||
site: config.buildOptions.site,
|
site: config.buildOptions.site,
|
||||||
sourcefile: id,
|
sourcefile: id,
|
||||||
|
|
|
@ -53,6 +53,7 @@ ${setup}`.trim();
|
||||||
|
|
||||||
// Transform from `.astro` to valid `.ts`
|
// Transform from `.astro` to valid `.ts`
|
||||||
let { code: tsResult } = await transform(astroResult, {
|
let { code: tsResult } = await transform(astroResult, {
|
||||||
|
as: 'fragment',
|
||||||
projectRoot: config.projectRoot.toString(),
|
projectRoot: config.projectRoot.toString(),
|
||||||
site: config.buildOptions.site,
|
site: config.buildOptions.site,
|
||||||
sourcefile: id,
|
sourcefile: id,
|
||||||
|
|
Loading…
Add table
Reference in a new issue