提交 88894307 编写于 作者: R Rafał Ruciński 提交者: Tim Neutkens

Properly escape the dot character in regexp (#4608)

A follow-up to #4604: the dot in the regexp was not escaped as intended. By default `*` matches greedily, so the results are the same, but the new regexp should be more clear. Sorry for the mistake.
上级 f2c25191
......@@ -3,7 +3,7 @@ import { readdirSync, existsSync } from 'fs'
export function getChunkNameFromFilename (filename, dev) {
if (dev) {
return filename.replace(/.[^.]*$/, '')
return filename.replace(/\.[^.]*$/, '')
}
return filename.replace(/-[^-]*$/, '')
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册