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 93d639e commit b125172Copy full SHA for b125172
packages/vite/src/node/plugins/css.ts
@@ -65,6 +65,7 @@ import {
65
createSerialPromiseQueue,
66
emptyCssComments,
67
encodeURIPath,
68
+ escapeRegex,
69
generateCodeFrame,
70
getHash,
71
getPackageManagerCommand,
@@ -1161,9 +1162,8 @@ export function getEmptyChunkReplacer(
1161
1162
outputFormat: ModuleFormat,
1163
): (code: string) => string {
1164
const emptyChunkFiles = pureCssChunkNames
- .map((file) => path.basename(file))
1165
+ .map((file) => escapeRegex(path.basename(file)))
1166
.join('|')
- .replace(/\./g, '\\.')
1167
1168
// for cjs, require calls might be chained by minifier using the comma operator.
1169
// in this case we have to keep one comma if a next require is chained
0 commit comments