From ecab41a7f8ee09c43e7ace6ef20d2f8693a5978a Mon Sep 17 00:00:00 2001 From: patak Date: Wed, 29 Nov 2023 15:27:38 +0100 Subject: [PATCH] feat(legacy): support any separator before hash in fileNames (#15170) --- packages/plugin-legacy/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-legacy/src/index.ts b/packages/plugin-legacy/src/index.ts index 1d964aa84f2792..9495d868d71502 100644 --- a/packages/plugin-legacy/src/index.ts +++ b/packages/plugin-legacy/src/index.ts @@ -120,7 +120,7 @@ const legacyEnvVarMarker = `__VITE_IS_LEGACY__` const _require = createRequire(import.meta.url) const nonLeadingHashInFileNameRE = /[^/]+\[hash(?::\d+)?\]/ -const prefixedHashInFileNameRE = /[.-]?\[hash(:\d+)?\]/ +const prefixedHashInFileNameRE = /\W?\[hash(:\d+)?\]/ function viteLegacyPlugin(options: Options = {}): Plugin[] { let config: ResolvedConfig