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 {
65
65
createSerialPromiseQueue ,
66
66
emptyCssComments ,
67
67
encodeURIPath ,
68
+ escapeRegex ,
68
69
generateCodeFrame ,
69
70
getHash ,
70
71
getPackageManagerCommand ,
@@ -1161,9 +1162,8 @@ export function getEmptyChunkReplacer(
1161
1162
outputFormat : ModuleFormat ,
1162
1163
) : ( code : string ) => string {
1163
1164
const emptyChunkFiles = pureCssChunkNames
1164
- . map ( ( file ) => path . basename ( file ) )
1165
+ . map ( ( file ) => escapeRegex ( path . basename ( file ) ) )
1165
1166
. join ( '|' )
1166
- . replace ( / \. / g, '\\.' )
1167
1167
1168
1168
// for cjs, require calls might be chained by minifier using the comma operator.
1169
1169
// 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