Commit 88894307 authored by Rafał Ruciński's avatar Rafał Ruciński Committed by 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.
parent f2c25191
...@@ -3,7 +3,7 @@ import { readdirSync, existsSync } from 'fs' ...@@ -3,7 +3,7 @@ import { readdirSync, existsSync } from 'fs'
export function getChunkNameFromFilename (filename, dev) { export function getChunkNameFromFilename (filename, dev) {
if (dev) { if (dev) {
return filename.replace(/.[^.]*$/, '') return filename.replace(/\.[^.]*$/, '')
} }
return filename.replace(/-[^-]*$/, '') return filename.replace(/-[^-]*$/, '')
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment