diff --git a/webpack.config.js b/webpack.config.js index cf5da0a..5aedc62 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -83,11 +83,11 @@ function config({isServer, isDev, analyze = false}) { const name = ({name}) => name; const endsWith = (tail) => ({name}) => name.endsWith(tail); const runtimeLast = (a, b) => b.chunk.id - a.chunk.id; - const appLast = (a, b) => a.includes('app.') - b.includes('app.') + const appLast = (a, b) => a.chunk?.name.includes('app') - b.chunk?.name.includes('app') return { js: files.filter(endsWith('.js')).sort(runtimeLast).map(name), - css: files.filter(endsWith('.css')).sort(runtimeLast).map(name).sort(appLast), + css: files.filter(endsWith('.css')).sort(appLast).map(name), }; } }),