Disable locales with Vite 8 (#38357)
This commit is contained in:
parent
0ef43a431d
commit
58cd1f3644
@ -26,9 +26,10 @@ import { modes } from './modes';
|
|||||||
import '../app/javascript/styles/application.scss';
|
import '../app/javascript/styles/application.scss';
|
||||||
import './styles.css';
|
import './styles.css';
|
||||||
|
|
||||||
const localeFiles = import.meta.glob('@/mastodon/locales/*.json', {
|
// Disabling locales in Storybook as it's breaking with Vite 8.
|
||||||
query: { as: 'json' },
|
// const localeFiles = import.meta.glob('@/mastodon/locales/*.json', {
|
||||||
});
|
// query: { as: 'json' },
|
||||||
|
// });
|
||||||
|
|
||||||
// Initialize MSW
|
// Initialize MSW
|
||||||
initialize({
|
initialize({
|
||||||
@ -39,17 +40,17 @@ const preview: Preview = {
|
|||||||
// Auto-generate docs: https://storybook.js.org/docs/writing-docs/autodocs
|
// Auto-generate docs: https://storybook.js.org/docs/writing-docs/autodocs
|
||||||
tags: ['autodocs'],
|
tags: ['autodocs'],
|
||||||
globalTypes: {
|
globalTypes: {
|
||||||
locale: {
|
// locale: {
|
||||||
description: 'Locale for the story',
|
// description: 'Locale for the story',
|
||||||
toolbar: {
|
// toolbar: {
|
||||||
title: 'Locale',
|
// title: 'Locale',
|
||||||
icon: 'globe',
|
// icon: 'globe',
|
||||||
items: Object.keys(localeFiles).map((path) =>
|
// items: Object.keys(localeFiles).map((path) =>
|
||||||
path.replace('/mastodon/locales/', '').replace('.json', ''),
|
// path.replace('/mastodon/locales/', '').replace('.json', ''),
|
||||||
),
|
// ),
|
||||||
dynamicTitle: true,
|
// dynamicTitle: true,
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
theme: {
|
theme: {
|
||||||
description: 'Theme for the story',
|
description: 'Theme for the story',
|
||||||
toolbar: {
|
toolbar: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user