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 pageViteID = pageInfo.id;
|
||||||
const pageData = getPageDataByViteID(internals, pageViteID);
|
const pageData = getPageDataByViteID(internals, pageViteID);
|
||||||
if (!pageData) continue;
|
if (!pageData) continue;
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
|
=======
|
||||||
|
console.log({ pageData });
|
||||||
|
>>>>>>> bdc0a6498 (updated)
|
||||||
const entryCss = pageData.contentCollectionCss?.get(id);
|
const entryCss = pageData.contentCollectionCss?.get(id);
|
||||||
const entryScripts = pageData.propagatedScripts?.get(id);
|
const entryScripts = pageData.propagatedScripts?.get(id);
|
||||||
if (entryCss) {
|
if (entryCss) {
|
||||||
|
@ -98,6 +102,10 @@ export function astroContentProdBundlePlugin({ internals }: { internals: BuildIn
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (entryScripts) {
|
if (entryScripts) {
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
console.log({ entryScripts });
|
||||||
|
>>>>>>> bdc0a6498 (updated)
|
||||||
chunk.code = chunk.code.replace(
|
chunk.code = chunk.code.replace(
|
||||||
JSON.stringify(SCRIPTS_PLACEHOLDER),
|
JSON.stringify(SCRIPTS_PLACEHOLDER),
|
||||||
JSON.stringify(
|
JSON.stringify(
|
||||||
|
|
|
@ -90,9 +90,6 @@ export function vitePluginAnalyzer(internals: BuildInternals): VitePlugin {
|
||||||
}
|
}
|
||||||
internals.discoveredScripts.add(moduleId);
|
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;
|
pageData.propagatedScripts = propagatedMapByImporter;
|
||||||
|
|
||||||
// Add propagated scripts to client build,
|
// Add propagated scripts to client build,
|
||||||
|
|
Loading…
Reference in a new issue