web: strengthened weak regex in import map.

This commit is contained in:
Ken Sternberg 2024-01-05 16:09:35 -08:00
parent a8f0e0dd12
commit bf618ab790
2 changed files with 3 additions and 2 deletions

View File

@ -1,3 +1,4 @@
// THIS IS A GENERATED FILE. DO NOT EDIT BY HAND. // THIS IS A GENERATED FILE. DO NOT EDIT BY HAND.
// //
// This file is generated by the build-storybook-import-maps script in the UI's base directory. // This file is generated by the build-storybook-import-maps script in the UI's base directory.
@ -76,5 +77,5 @@ export const cssImportMaps = cssImportMapsBase.reduce(
...acc, ...acc,
[importLine]: importLine.replace(/.css/, ".css?inline"), [importLine]: importLine.replace(/.css/, ".css?inline"),
}), }),
{}, {}
); );

View File

@ -82,7 +82,7 @@ type ImportMapType = Record<string, string>;
export const cssImportMaps = cssImportMapsBase.reduce( export const cssImportMaps = cssImportMapsBase.reduce(
(acc: ImportMapType, importLine: string) => ({ (acc: ImportMapType, importLine: string) => ({
...acc, ...acc,
[importLine]: importLine.replace(/.css/, ".css?inline"), [importLine]: importLine.replace(/\.css/, ".css?inline"),
}), }),
{} {}
); );