From 6c810d085f41a6bc38642f8cbd6a31bf8352dd77 Mon Sep 17 00:00:00 2001 From: martyanov-av Date: Tue, 16 Jan 2024 20:09:02 +0300 Subject: [PATCH] chore --- webpack.config.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index f9ea00f..e9d6b2e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -34,6 +34,7 @@ function config({isServer, isDev, analyze = false}) { fallback: { stream: false, crypto: false, + "url": require.resolve("url/"), }, extensions: (isServer ? ['.server.tsx', '.server.ts', '.server.js'] @@ -79,7 +80,7 @@ function config({isServer, isDev, analyze = false}) { generate: (seed, files) => { const name = ({name}) => name; const endsWith = (tail) => ({name}) => name.endsWith(tail); - const runtimeLast = (a, b) => b.chunk.id - a.chunk.id; + const runtimeLast = (a, b) => b.chunk?.id - a.chunk?.id; return { js: files.filter(endsWith('.js')).sort(runtimeLast).map(name), css: files.filter(endsWith('.css')).sort(runtimeLast).map(name), @@ -87,7 +88,7 @@ function config({isServer, isDev, analyze = false}) { } }), new RtlCssPlugin({ - filename: 'app.client.rtl.css', + filename: '[name].rtl.css', hooks: { pre:function(root, postcss){ root.nodes.forEach((node) => {