updated
This commit is contained in:
parent
70342a8306
commit
5885a7e67c
2 changed files with 8 additions and 3 deletions
|
@ -88,7 +88,11 @@ export function astroContentProdBundlePlugin({ internals }: { internals: BuildIn
|
|||
const pageViteID = pageInfo.id;
|
||||
const pageData = getPageDataByViteID(internals, pageViteID);
|
||||
if (!pageData) continue;
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
console.log({ pageData });
|
||||
>>>>>>> bdc0a6498 (updated)
|
||||
const entryCss = pageData.contentCollectionCss?.get(id);
|
||||
const entryScripts = pageData.propagatedScripts?.get(id);
|
||||
if (entryCss) {
|
||||
|
@ -98,6 +102,10 @@ export function astroContentProdBundlePlugin({ internals }: { internals: BuildIn
|
|||
);
|
||||
}
|
||||
if (entryScripts) {
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
console.log({ entryScripts });
|
||||
>>>>>>> bdc0a6498 (updated)
|
||||
chunk.code = chunk.code.replace(
|
||||
JSON.stringify(SCRIPTS_PLACEHOLDER),
|
||||
JSON.stringify(
|
||||
|
|
|
@ -90,9 +90,6 @@ export function vitePluginAnalyzer(internals: BuildInternals): VitePlugin {
|
|||
}
|
||||
internals.discoveredScripts.add(moduleId);
|
||||
|
||||
// TODO: map raw URL (?type=script) to client build ready URL
|
||||
// This will inject the raw URL as a script tag as-is,
|
||||
// which will fail to map with the client build output.
|
||||
pageData.propagatedScripts = propagatedMapByImporter;
|
||||
|
||||
// Add propagated scripts to client build,
|
||||
|
|
Loading…
Reference in a new issue