From 93cb725ae00087820f865180c497d68096598e61 Mon Sep 17 00:00:00 2001 From: Mikkel Laursen Date: Wed, 27 Mar 2024 13:02:26 -0400 Subject: [PATCH] feat(core): support non-barrel file exports This should improve build performance since bundlers won't need to fetch all files within react-md to be able to start trimming unused files --- packages/core/package.json | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/packages/core/package.json b/packages/core/package.json index 629f274cbb..f5b08b26b2 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -15,25 +15,17 @@ "require": "./dist/test-utils/polyfills", "default": "./dist/test-utils/polyfills/index.js" }, - "./test-utils/polyfills/*": { - "require": "./dist/test-utils/polyfills/*", - "default": "./dist/test-utils/polyfills/*.js" - }, - "./test-utils/jest-setup": "./dist/test-utils/jest-setup.js", - "./test-utils/data-testid": "./dist/test-utils/data-testid.js", "./test-utils": "./dist/test-utils/index.js", - "./test-utils/*": { - "require": "./dist/test-utils/*", - "default": "./dist/test-utils/*.js" - }, "./colors": { "sass": "./dist/_colors.scss" }, + "./*": "./dist/*.js", + "./*/*": "./dist/*/*.js", "./package.json": "./package.json" }, "sideEffects": [ "dist/**/*.scss", - "dist/test-utils/polyfills" + "dist/test-utils/polyfills/**/*" ], "scripts": { "run-script": "tsx --tsconfig scripts/tsconfig.json",