From 8889430777632116555e3ac5ded1e993d001f599 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Ruci=C5=84ski?= Date: Thu, 14 Jun 2018 19:47:49 +0200 Subject: [PATCH] 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. --- server/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/utils.js b/server/utils.js index 4b6339c6..f0d35e09 100644 --- a/server/utils.js +++ b/server/utils.js @@ -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(/-[^-]*$/, '') }