Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp committed Feb 3, 2023
1 parent 4f82f41 commit b44f4de
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/astro/src/core/build/plugins/plugin-analyzer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ import { prependForwardSlash } from '../../../core/path.js';
import { getTopLevelPages, moduleIsTopLevelPage, walkParentInfos } from '../graph.js';
import { getPageDataByViteID, trackClientOnlyPageDatas } from '../internal.js';
import { PROPAGATED_ASSET_FLAG } from '../../../content/consts.js';
import { pathToFileURL } from 'url';

function isPropagatedAsset(id: string) {
return pathToFileURL(id).searchParams.has(PROPAGATED_ASSET_FLAG);
try {
return new URL('file://' + id).searchParams.has(PROPAGATED_ASSET_FLAG)
} catch {
return false;
}
}

export function vitePluginAnalyzer(internals: BuildInternals): VitePlugin {
Expand Down

0 comments on commit b44f4de

Please sign in to comment.