From c07ea78f9752a8aa103298fe7237a5474c756074 Mon Sep 17 00:00:00 2001 From: Ivan Gabaldon Date: Sun, 29 Sep 2024 14:45:28 +0200 Subject: [PATCH] module solid --- .../icons-solidjs/{build.mjs => build.js} | 0 packages/icons-solidjs/package.json | 20 +++++++++++++++---- .../{rollup.config.mjs => rollup.config.js} | 6 +++--- 3 files changed, 19 insertions(+), 7 deletions(-) rename packages/icons-solidjs/{build.mjs => build.js} (100%) rename packages/icons-solidjs/{rollup.config.mjs => rollup.config.js} (82%) diff --git a/packages/icons-solidjs/build.mjs b/packages/icons-solidjs/build.js similarity index 100% rename from packages/icons-solidjs/build.mjs rename to packages/icons-solidjs/build.js diff --git a/packages/icons-solidjs/package.json b/packages/icons-solidjs/package.json index 9650e05474..2d285c8459 100644 --- a/packages/icons-solidjs/package.json +++ b/packages/icons-solidjs/package.json @@ -17,17 +17,29 @@ "url": "git+https://github.com/tabler/tabler-icons.git", "directory": "packages/icons-solidjs" }, + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "import": { + "types": "./dist/esm/tabler-icons-solidjs.d.ts", + "default": "./dist/esm/tabler-icons-solidjs.js" + }, + "require": { + "types": "./dist/cjs/tabler-icons-solidjs.d.cts", + "default": "./dist/cjs/tabler-icons-solidjs.cjs" + } + } + }, "main": "./dist/cjs/tabler-icons-solidjs.cjs", - "module": "./dist/esm/tabler-icons-solidjs.mjs", "types": "./dist/cjs/tabler-icons-solidjs.d.cts", - "sideEffects": false, "files": [ "dist" ], "scripts": { "build": "pnpm run clean && pnpm run copy:license && pnpm run build:icons && pnpm typecheck && pnpm run build:bundles", - "build:icons": "node build.mjs", - "build:bundles": "rollup -c ./rollup.config.mjs", + "build:icons": "node build.js", + "build:bundles": "rollup -c ./rollup.config.js", "copy:license": "cp ../../LICENSE ./LICENSE", "clean": "rm -rf dist && find . ! -name '.gitkeep' -path '*/src/icons/*' -exec rm -rf {} +", "test": "vitest run", diff --git a/packages/icons-solidjs/rollup.config.mjs b/packages/icons-solidjs/rollup.config.js similarity index 82% rename from packages/icons-solidjs/rollup.config.mjs rename to packages/icons-solidjs/rollup.config.js index 817c8651ea..169127a723 100644 --- a/packages/icons-solidjs/rollup.config.mjs +++ b/packages/icons-solidjs/rollup.config.js @@ -16,7 +16,7 @@ const bundles = [ format: 'esm', inputs, preserveModules: true, - extension: 'mjs', + extension: 'js', }, ]; @@ -24,9 +24,9 @@ export default [ { input: inputs[0], output: [{ - file: `dist/esm/${outputFileName}.d.ts` + file: `dist/esm/${outputFileName}.d.ts`, format: 'esm' }, { - file: `dist/cjs/${outputFileName}.d.cts` + file: `dist/cjs/${outputFileName}.d.cts`, format: 'cjs' }], plugins: [dts()], },