mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
enable code splitting and add chunk names to dynamic import and create separate chunk vendor for all node modules (#2245)
* build: increase Limit chunk to enable code splitting add chunk names to dynamic import * Remove limitchunkcount and have separate chunk for each node module so we dnt have any unnamed id.js chunks * fix * create one chunk for all node modules * Add caret to peer deps * extra space
This commit is contained in:
parent
41ccd47791
commit
4a26845395
8 changed files with 67 additions and 16 deletions
|
@ -63,7 +63,9 @@ export const setLanguage = async (newLng: string | undefined) => {
|
|||
|
||||
document.documentElement.dir = currentLanguage.rtl ? "rtl" : "ltr";
|
||||
|
||||
currentLanguageData = await import(`./locales/${currentLanguage.lng}.json`);
|
||||
currentLanguageData = await import(
|
||||
/* webpackChunkName: "i18n-[request]" */ `./locales/${currentLanguage.lng}.json`
|
||||
);
|
||||
|
||||
languageDetector.cacheUserLanguage(currentLanguage.lng);
|
||||
};
|
||||
|
@ -76,7 +78,9 @@ export const setLanguageFirstTime = async () => {
|
|||
|
||||
document.documentElement.dir = currentLanguage.rtl ? "rtl" : "ltr";
|
||||
|
||||
currentLanguageData = await import(`./locales/${currentLanguage.lng}.json`);
|
||||
currentLanguageData = await import(
|
||||
/* webpackChunkName: "i18n-[request]" */ `./locales/${currentLanguage.lng}.json`
|
||||
);
|
||||
|
||||
languageDetector.cacheUserLanguage(currentLanguage.lng);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue