From e5a9a05f8fce8cc518be6606d92032ba189fb8b6 Mon Sep 17 00:00:00 2001 From: Kevin Van Cott Date: Sun, 22 Oct 2023 19:21:58 -0500 Subject: [PATCH] release v2.0.0-beta.7 - fix locale esm? --- packages/material-react-table/build-locales.mjs | 11 ++++++++++- packages/material-react-table/package.json | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/material-react-table/build-locales.mjs b/packages/material-react-table/build-locales.mjs index dec391dba..08fec0a8a 100644 --- a/packages/material-react-table/build-locales.mjs +++ b/packages/material-react-table/build-locales.mjs @@ -1,3 +1,4 @@ +/* eslint-disable perfectionist/sort-objects */ import typescript from '@rollup/plugin-typescript'; import fs from 'fs'; import { rollup } from 'rollup'; @@ -66,7 +67,7 @@ async function build(locale) { }); const typeFile = `import { type MRT_Localization } from '../..'; - export declare const MRT_Localization_${locale +export declare const MRT_Localization_${locale .toUpperCase() .replaceAll('-', '_')}: MRT_Localization; `; @@ -89,6 +90,14 @@ async function build(locale) { module: './index.esm.js', sideEffects: false, types: './index.d.ts', + exports: { + '.': { + types: './index.d.ts', + import: './index.esm.js', + require: './index.js', + }, + './package.json': './package.json', + }, }, null, 2, diff --git a/packages/material-react-table/package.json b/packages/material-react-table/package.json index 578407d81..0ec027cbb 100644 --- a/packages/material-react-table/package.json +++ b/packages/material-react-table/package.json @@ -1,5 +1,5 @@ { - "version": "2.0.0-beta.6", + "version": "2.0.0-beta.7", "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.",