[ci] format
This commit is contained in:
parent
b60cc0538b
commit
59aa8d4283
3 changed files with 5 additions and 5 deletions
|
@ -281,7 +281,7 @@ async function generatePath(
|
||||||
scripts.add({
|
scripts.add({
|
||||||
props: { type: 'module', src },
|
props: { type: 'module', src },
|
||||||
children: '',
|
children: '',
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add all injected scripts to the page.
|
// Add all injected scripts to the page.
|
||||||
|
|
|
@ -9,8 +9,8 @@ import type {
|
||||||
SSRElement,
|
SSRElement,
|
||||||
SSRLoadedRenderer,
|
SSRLoadedRenderer,
|
||||||
} from '../../../@types/astro';
|
} from '../../../@types/astro';
|
||||||
import { PAGE_SCRIPT_ID } from '../../../vite-plugin-scripts/index.js';
|
|
||||||
import { prependForwardSlash } from '../../../core/path.js';
|
import { prependForwardSlash } from '../../../core/path.js';
|
||||||
|
import { PAGE_SCRIPT_ID } from '../../../vite-plugin-scripts/index.js';
|
||||||
import { LogOptions } from '../../logger/core.js';
|
import { LogOptions } from '../../logger/core.js';
|
||||||
import { isPage } from '../../util.js';
|
import { isPage } from '../../util.js';
|
||||||
import { render as coreRender } from '../core.js';
|
import { render as coreRender } from '../core.js';
|
||||||
|
|
|
@ -2,9 +2,9 @@ import { Plugin as VitePlugin } from 'vite';
|
||||||
import { AstroConfig } from '../@types/astro.js';
|
import { AstroConfig } from '../@types/astro.js';
|
||||||
import { PAGE_SSR_SCRIPT_ID } from './index.js';
|
import { PAGE_SSR_SCRIPT_ID } from './index.js';
|
||||||
|
|
||||||
import { isPage } from '../core/util.js';
|
|
||||||
import ancestor from 'common-ancestor-path';
|
import ancestor from 'common-ancestor-path';
|
||||||
import MagicString from 'magic-string';
|
import MagicString from 'magic-string';
|
||||||
|
import { isPage } from '../core/util.js';
|
||||||
|
|
||||||
export default function astroScriptsPostPlugin({ config }: { config: AstroConfig }): VitePlugin {
|
export default function astroScriptsPostPlugin({ config }: { config: AstroConfig }): VitePlugin {
|
||||||
function normalizeFilename(filename: string) {
|
function normalizeFilename(filename: string) {
|
||||||
|
@ -19,7 +19,7 @@ export default function astroScriptsPostPlugin({ config }: { config: AstroConfig
|
||||||
return {
|
return {
|
||||||
name: 'astro:scripts:page-ssr',
|
name: 'astro:scripts:page-ssr',
|
||||||
enforce: 'post',
|
enforce: 'post',
|
||||||
|
|
||||||
transform(this, code, id, options) {
|
transform(this, code, id, options) {
|
||||||
if (!options?.ssr) return;
|
if (!options?.ssr) return;
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ export default function astroScriptsPostPlugin({ config }: { config: AstroConfig
|
||||||
return {
|
return {
|
||||||
code: s.toString(),
|
code: s.toString(),
|
||||||
map: s.generateMap(),
|
map: s.generateMap(),
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue