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) => {