From 82db69c378709fde8b71aed6189c5a69eac2bebf Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Fri, 7 Oct 2022 14:39:16 +0300 Subject: [PATCH 1/2] Fix legacy browser support Add @remix-run/router to babel-loader. --- webpack.common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.common.js b/webpack.common.js index fddcfe66a2..b7c3ad6f47 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -121,7 +121,7 @@ const config = { }, { test: /\.(js|jsx)$/, - exclude: /node_modules[\\/](?!@uupaa[\\/]dynamic-import-polyfill|blurhash|date-fns|epubjs|flv.js|libarchive.js|marked|react-router|screenfull)/, + exclude: /node_modules[\\/](?!@uupaa[\\/]dynamic-import-polyfill|@remix-run[\\/]router|blurhash|date-fns|epubjs|flv.js|libarchive.js|marked|react-router|screenfull)/, use: [{ loader: 'babel-loader', options: { From 2c31a55b08917640f0f1be05c2a3fb828465daed Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Fri, 7 Oct 2022 15:14:30 +0300 Subject: [PATCH 2/2] Fix CSS fallback Turn off `mergeLonghand` because it combines `padding-*`, breaking fallback styles. --- cssnano.config.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 cssnano.config.js diff --git a/cssnano.config.js b/cssnano.config.js new file mode 100644 index 0000000000..376b8f011b --- /dev/null +++ b/cssnano.config.js @@ -0,0 +1,10 @@ +module.exports = { + preset: [ + 'default', + // Turn off `mergeLonghand` because it combines `padding-*` and `margin-*`, + // breaking fallback styles. + // https://github.com/cssnano/cssnano/issues/1163 + // https://github.com/cssnano/cssnano/issues/1192 + { mergeLonghand: false } + ] +};