File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/vite/src/node/plugins Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ import {
6565 createSerialPromiseQueue ,
6666 emptyCssComments ,
6767 encodeURIPath ,
68+ escapeRegex ,
6869 generateCodeFrame ,
6970 getHash ,
7071 getPackageManagerCommand ,
@@ -1161,9 +1162,8 @@ export function getEmptyChunkReplacer(
11611162 outputFormat : ModuleFormat ,
11621163) : ( code : string ) => string {
11631164 const emptyChunkFiles = pureCssChunkNames
1164- . map ( ( file ) => path . basename ( file ) )
1165+ . map ( ( file ) => escapeRegex ( path . basename ( file ) ) )
11651166 . join ( '|' )
1166- . replace ( / \. / g, '\\.' )
11671167
11681168 // for cjs, require calls might be chained by minifier using the comma operator.
11691169 // in this case we have to keep one comma if a next require is chained
You can’t perform that action at this time.
0 commit comments