Skip to content

Commit

Permalink
vite esm locale import fixes?
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinVandy committed Oct 23, 2023
1 parent 2e059fe commit 5309954
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/material-react-table-docs/pages/migrating-to-v2.mdx
Expand Up @@ -34,7 +34,7 @@ import { InstallCommand } from '../components/mdx/InstallCommand';

<InstallCommand packagesString="@mui/x-date-pickers" />

- If you use the date picker features, you will also need to import the `LocalizationProvider` from `@mui/x-date-pickers` and wrap your app in it. See [here](https://mui.com/guides/right-to-left/#main-content) for more details.
- If you use the date picker features, you will also need to import the `LocalizationProvider` from `@mui/x-date-pickers` and wrap your app in it. See [here](https://mui.com/x/react-date-pickers/adapters-locale/) for more details.

```jsx
import { LocalizationProvider } from '@mui/x-date-pickers';
Expand Down
6 changes: 6 additions & 0 deletions packages/material-react-table/build-locales.mjs
Expand Up @@ -66,6 +66,12 @@ async function build(locale) {
sourcemap: false,
});

await bundle.write({
file: `./locales/${locale}.js`,
format: 'esm',
sourcemap: false,
});

const typeFile = `import { type MRT_Localization } from '../..';
export declare const MRT_Localization_${locale
.toUpperCase()
Expand Down
2 changes: 1 addition & 1 deletion packages/material-react-table/package.json
@@ -1,5 +1,5 @@
{
"version": "2.0.0-beta.7",
"version": "2.0.0-beta.8",
"license": "MIT",
"name": "material-react-table",
"description": "A fully featured Material UI V5 implementation of TanStack React Table V8, written from the ground up in TypeScript.",
Expand Down

0 comments on commit 5309954

Please sign in to comment.