fix(vuetify): remove defaultRtl handling

With [3.5.0](https://github.com/vuetifyjs/vuetify/releases/tag/v3.5.0),
the defaultRtl information is hardcoded in the package and can't be treeshaken with our method.

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
Fernando Fernández 2024-02-26 08:08:34 +00:00
parent 8305937f6f
commit 7f8bd1a0f6
3 changed files with 1 additions and 23 deletions

View File

@ -53,19 +53,6 @@ const vuetifyExports = localeNames
.map((l) => localeTransform(vuetifyKeys, l))
.filter((l): l is string => typeof l === 'string');
/**
* Map the RTL value of the mapped locales
*/
const transformedVuetifyRtl: Record<string, boolean> = {};
for (const e of vuetifyExports) {
const localeSplitted = e.includes(' as ') ? e.split(' as ') : e;
const originalLocale = Array.isArray(localeSplitted) ? localeSplitted[0] : e;
const targetLocale = Array.isArray(localeSplitted) ? localeSplitted[1] : e;
transformedVuetifyRtl[targetLocale] = vuetify.defaultRtl[originalLocale as keyof typeof vuetify.defaultRtl];
}
/**
* Get commit hash
*/
@ -84,8 +71,5 @@ export default {
'virtual:locales/vuetify': `export { ${vuetifyExports.join(
', '
)} } from 'vuetify/locale'`,
'virtual:locales/vuetify/rtl': `export const defaultRtl = ${JSON.stringify(
transformedVuetifyRtl
)}`,
'virtual:commit': `export const commit_hash = ${commit_hash}`
};

View File

@ -1,5 +1,4 @@
import * as vuetifyLocales from 'virtual:locales/vuetify';
import { defaultRtl } from 'virtual:locales/vuetify/rtl';
import { createVuetify, type ThemeDefinition } from 'vuetify';
import { md3 } from 'vuetify/blueprints';
import { aliases, mdi } from 'vuetify/iconsets/mdi-svg';
@ -79,8 +78,7 @@ export const vuetify = createVuetify({
},
locale: {
fallback: 'en',
messages: vuetifyLocales,
rtl: defaultRtl
messages: vuetifyLocales
},
theme: {
themes: {

View File

@ -12,10 +12,6 @@ declare module 'virtual:locales/vuetify' {
export = typeWithoutRtl;
}
declare module 'virtual:locales/vuetify/rtl' {
export { defaultRtl } from 'vuetify/locale';
}
declare module 'virtual:commit' {
export const commit_hash: string | undefined;
}