From a913119ca1562c3bdb4335a794f05c30ea078b59 Mon Sep 17 00:00:00 2001 From: JanSzewczyk Date: Wed, 25 Dec 2024 21:57:43 +0100 Subject: [PATCH] fix(build): fix exporting package --- package.json | 7 ------- src/index.js | 5 ++--- tsup.config.js | 19 ++++++++----------- 3 files changed, 10 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index 54f204a..4f1d63a 100644 --- a/package.json +++ b/package.json @@ -19,13 +19,6 @@ "license": "MIT", "author": "Szum-Tech ", "type": "module", - "exports": { - ".": { - "import": "./dist/index.js", - "require": "./dist/index.cjs", - "default": "./dist/index.cjs" - } - }, "main": "./dist/index.cjs", "module": "./dist/index.js", "files": [ diff --git a/src/index.js b/src/index.js index 29e62ca..df8e2da 100644 --- a/src/index.js +++ b/src/index.js @@ -35,6 +35,5 @@ const tailwindcssConfig = { tailwindFunctions: ["classNames", "clsx", "cn"] }; -export const config = { ...baseConfig, plugins, ...(hasTailwindcss ? tailwindcssConfig : {}) }; - -export default config; +/** @type {import('prettier').Config || import('prettier-plugin-tailwindcss').PluginOptions} */ +export default { ...baseConfig, plugins, ...(hasTailwindcss ? tailwindcssConfig : {}) }; diff --git a/tsup.config.js b/tsup.config.js index f65df82..72c7826 100644 --- a/tsup.config.js +++ b/tsup.config.js @@ -1,13 +1,10 @@ import { defineConfig } from "tsup"; -export default defineConfig([ - { - entry: ["./src/**/*.js"], - outDir: "dist", - minify: true, - clean: true, - format: ["esm", "cjs"], - treeshake: true, - splitting: true - } -]); +export default defineConfig({ + entry: ["./src/**/*.js"], + outDir: "dist", + minify: true, + clean: true, + format: ["esm", "cjs"], + treeshake: true +});