diff --git a/package-lock.json b/package-lock.json index ea73261..1e6a29f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -43,10 +43,8 @@ "prettier-plugin-tailwindcss": "^0.5.9", "react": "^18.2.0", "react-dom": "^18.2.0", - "rollup-plugin-typescript2": "^0.36.0", "storybook": "^7.6.3", "tailwindcss": "^3.3.6", - "tslib": "^2.6.2", "typescript": "~5.2.0", "vite": "^4.4.11", "vue-tsc": "^1.8.19" @@ -13966,83 +13964,6 @@ "fsevents": "~2.3.2" } }, - "node_modules/rollup-plugin-typescript2": { - "version": "0.36.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.36.0.tgz", - "integrity": "sha512-NB2CSQDxSe9+Oe2ahZbf+B4bh7pHwjV5L+RSYpCu7Q5ROuN94F9b6ioWwKfz3ueL3KTtmX4o2MUH2cgHDIEUsw==", - "dev": true, - "dependencies": { - "@rollup/pluginutils": "^4.1.2", - "find-cache-dir": "^3.3.2", - "fs-extra": "^10.0.0", - "semver": "^7.5.4", - "tslib": "^2.6.2" - }, - "peerDependencies": { - "rollup": ">=1.26.3", - "typescript": ">=2.4.0" - } - }, - "node_modules/rollup-plugin-typescript2/node_modules/@rollup/pluginutils": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", - "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", - "dev": true, - "dependencies": { - "estree-walker": "^2.0.1", - "picomatch": "^2.2.2" - }, - "engines": { - "node": ">= 8.0.0" - } - }, - "node_modules/rollup-plugin-typescript2/node_modules/fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/rollup-plugin-typescript2/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/rollup-plugin-typescript2/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/rollup-plugin-typescript2/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/run-applescript": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", diff --git a/package.json b/package.json index 9526823..d602b51 100644 --- a/package.json +++ b/package.json @@ -25,19 +25,24 @@ ], "main": "./dist/vue-components.umd.cjs", "module": "./dist/vue-components.js", + "types": "./dist/main.d.ts", "exports": { ".": { "import": "./dist/vue-components.js", "require": "./dist/vue-components.umd.cjs", - "types": "./dist/src/main.d.ts" + "types": "./dist/main.d.ts" }, "./tailwind.config.ts": "./tailwind.config.ts", - "./vue-components.css": "./dist/main.css" + "./main.css": { + "import": "./dist/main.css", + "require": "./dist/main.css" + }, + "./*": "./dist/*" }, "scripts": { - "build": "run-p type-check \"build-only {@}\" --", + "build": "run-p build-types \"build-only {@}\" --", "build-only": "vite build", - "type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false", + "build-types": "vue-tsc -declaration --emitDeclarationOnly -p tsconfig.app.json --composite false", "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", "format": "prettier --write src/", "storybook": "storybook dev -p 6006", @@ -79,10 +84,8 @@ "prettier-plugin-tailwindcss": "^0.5.9", "react": "^18.2.0", "react-dom": "^18.2.0", - "rollup-plugin-typescript2": "^0.36.0", "storybook": "^7.6.3", "tailwindcss": "^3.3.6", - "tslib": "^2.6.2", "typescript": "~5.2.0", "vite": "^4.4.11", "vue-tsc": "^1.8.19" diff --git a/tsconfig.app.json b/tsconfig.app.json index 3e5b621..ef5d9da 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -5,6 +5,7 @@ "compilerOptions": { "composite": true, "baseUrl": ".", + "outDir": "dist", "paths": { "@/*": ["./src/*"] } diff --git a/vite.config.ts b/vite.config.ts index 3421c67..eb93cf1 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,7 +3,6 @@ import { fileURLToPath, URL } from 'node:url' import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import { resolve } from 'path' -import typescript from 'rollup-plugin-typescript2' // https://vitejs.dev/config/ export default defineConfig({ @@ -35,21 +34,7 @@ export default defineConfig({ } } }, - plugins: [ - typescript({ - check: false, - exclude: ['.storybook/*'], - tsconfig: resolve(__dirname, 'tsconfig.app.json'), - tsconfigOverride: { - compilerOptions: { - emitDeclarationOnly: true, - declaration: true, - declarationMap: true - } - } - }), - vue() - ], + plugins: [vue()], resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url))