Closed nineaiyu closed 1 week ago
The size of the file selected in the screenshot cannot be reduced, because it is a third-party library svelte-jsoneditor that I use for the vue3-jsoneditor. At the same time, I tried to optimize the download as much as possible by dynamically importing dependencies where possible, for example, the querylanguages:
switch (languageId) {
case 'javascript': {
const {javascriptQueryLanguage} = await import('vanilla-jsoneditor');
queryLanguagesBuffer[languageId] = javascriptQueryLanguage;
break;
}
case 'lodash': {
const {lodashQueryLanguage} = await import('vanilla-jsoneditor');
queryLanguagesBuffer[languageId] = lodashQueryLanguage;
break;
}
case 'jmespath': {
const {jmespathQueryLanguage} = await import('vanilla-jsoneditor');
queryLanguagesBuffer[languageId] = jmespathQueryLanguage;
break;
}
default: {
break;
}
}
Therefore, you can further optimize your application by tune the optimal split chanking in the Vite config
Thank you 👍
After packing, the file size is quite large. Is there any way to reduce the size of the packed file?