mirror of
https://github.com/imputnet/cobalt.git
synced 2025-01-19 13:18:28 +00:00
web/vite: split transformers.js into separate chunk
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
Run tests / check lockfile correctness (push) Has been cancelled
Run tests / web sanity check (push) Has been cancelled
Run tests / api sanity check (push) Has been cancelled
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
Run tests / check lockfile correctness (push) Has been cancelled
Run tests / web sanity check (push) Has been cancelled
Run tests / api sanity check (push) Has been cancelled
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…
Reference in a new issue