We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53fb805 commit 047ce04Copy full SHA for 047ce04
src/utils/manifest.ts
@@ -269,6 +269,16 @@ function getContentScriptCssFiles(
269
contentScripts: ContentScriptEntrypoint[],
270
buildOutput: BuildOutput,
271
): string[] | undefined {
272
- console.warn('TODO: getContentScriptCssFiles');
+ const css: string[] = [];
273
+
274
+ contentScripts.forEach((script) => {
275
+ const cssRegex = new RegExp(`^assets/${script.name}-[a-f0-9]{8}.css$`);
276
+ const relatedCss = buildOutput.find((chunk) =>
277
+ chunk.fileName.match(cssRegex),
278
+ );
279
+ if (relatedCss) css.push(relatedCss.fileName);
280
+ });
281
282
+ if (css.length > 0) return css;
283
return undefined;
284
}
0 commit comments