Fix Webpack magic comments for Windows (#413)

This commit is contained in:
Matt Cowley 2022-12-15 20:40:42 +00:00 committed by GitHub
parent 895d448bcf
commit 216cfd2033
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,7 +46,7 @@ export const getI18n = async () => {
if (availablePack === defaultPack) continue; if (availablePack === defaultPack) continue;
if (i18nPacks[availablePack]) continue; if (i18nPacks[availablePack]) continue;
const { default: languageData } = await import( const { default: languageData } = await import(
/* webpackInclude: /i18n\/[^/]+\/languages\.js$/ */ /* webpackInclude: /i18n[\/\\][^\/\\]+[\/\\]languages\.js$/ */
/* webpackMode: "eager" */ /* webpackMode: "eager" */
`./${toSep(availablePack, '-')}/languages.js` `./${toSep(availablePack, '-')}/languages.js`
); );
@ -72,7 +72,7 @@ const loadLanguagePack = async pack => {
// Load in the full pack // Load in the full pack
// Use webpack magic to only build chunks for lang/index.js // Use webpack magic to only build chunks for lang/index.js
const { default: packData } = await import( const { default: packData } = await import(
/* webpackInclude: /i18n\/[^/]+\/index\.js$/ */ /* webpackInclude: /i18n[\/\\][^\/\\]+[\/\\]index\.js$/ */
/* webpackMode: "lazy" */ /* webpackMode: "lazy" */
`./${toSep(pack, '-')}/index.js` `./${toSep(pack, '-')}/index.js`
); );