mirror of
https://github.com/wukko/cobalt.git
synced 2025-05-11 19:24:27 +02:00
web/vite: split transformers.js into separate chunk
This commit is contained in:
parent
8a5b25b4ce
commit
2273bb388f
@ -88,6 +88,9 @@ export default defineConfig({
|
|||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
output: {
|
output: {
|
||||||
manualChunks: (id) => {
|
manualChunks: (id) => {
|
||||||
|
if (id.includes('huggingface/transformers'))
|
||||||
|
return 'hf_transformers';
|
||||||
|
|
||||||
if (id.includes('/web/i18n') && id.endsWith('.json')) {
|
if (id.includes('/web/i18n') && id.endsWith('.json')) {
|
||||||
const lang = id.split('/web/i18n/')?.[1].split('/')?.[0];
|
const lang = id.split('/web/i18n/')?.[1].split('/')?.[0];
|
||||||
if (lang) {
|
if (lang) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user