diff --git a/vite.config.ts b/vite.config.ts index 76df9709f..387769a5d 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -62,9 +62,8 @@ export default defineConfig({ entryFileNames: 'src/pages/[name]/index.js', chunkFileNames: isDev ? 'assets/js/[name].js' : 'assets/js/[name].[hash].js', assetFileNames: assetInfo => { - const { dir, name: _name } = path.parse(assetInfo.name); - const assetFolder = dir.split('/').at(-1); - const name = assetFolder + firstUpperCase(_name); + const { name } = path.parse(assetInfo.name); + console.log(assetInfo.name, name); if (name === 'contentStyle') { return `assets/css/contentStyle${cacheInvalidationKey}.chunk.css`; } @@ -75,11 +74,6 @@ export default defineConfig({ }, }); -function firstUpperCase(str: string) { - const firstAlphabet = new RegExp(/( |^)[a-z]/, 'g'); - return str.toLowerCase().replace(firstAlphabet, L => L.toUpperCase()); -} - let cacheInvalidationKey: string = generateKey(); function regenerateCacheInvalidationKey() { cacheInvalidationKey = generateKey();