From 216cfd2033d9937a1c0b447645697697eb2e92e6 Mon Sep 17 00:00:00 2001 From: Matt Cowley Date: Thu, 15 Dec 2022 20:40:42 +0000 Subject: [PATCH] Fix Webpack magic comments for Windows (#413) --- src/nginxconfig/i18n/setup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nginxconfig/i18n/setup.js b/src/nginxconfig/i18n/setup.js index c0bb8c2..d9f0c40 100644 --- a/src/nginxconfig/i18n/setup.js +++ b/src/nginxconfig/i18n/setup.js @@ -46,7 +46,7 @@ export const getI18n = async () => { if (availablePack === defaultPack) continue; if (i18nPacks[availablePack]) continue; const { default: languageData } = await import( - /* webpackInclude: /i18n\/[^/]+\/languages\.js$/ */ + /* webpackInclude: /i18n[\/\\][^\/\\]+[\/\\]languages\.js$/ */ /* webpackMode: "eager" */ `./${toSep(availablePack, '-')}/languages.js` ); @@ -72,7 +72,7 @@ const loadLanguagePack = async pack => { // Load in the full pack // Use webpack magic to only build chunks for lang/index.js const { default: packData } = await import( - /* webpackInclude: /i18n\/[^/]+\/index\.js$/ */ + /* webpackInclude: /i18n[\/\\][^\/\\]+[\/\\]index\.js$/ */ /* webpackMode: "lazy" */ `./${toSep(pack, '-')}/index.js` );