diff --git a/packages/docs/devCommand.js b/packages/docs/devCommand.js index 05bed15..6b6a328 100644 --- a/packages/docs/devCommand.js +++ b/packages/docs/devCommand.js @@ -8,7 +8,7 @@ function runCommand() { 'start turbo run build --filter=vuesax-ts -- --watch && start vitepress dev docs --port 3000' } else { command = - 'turborun build --filter=vuesax-ts -- --watch & vitepress dev docs --port 3000' + 'turbo run build --filter=vuesax-ts -- --watch & vitepress dev docs --port 3000' } execSync(command, { stdio: 'inherit' }) diff --git a/packages/vuesax/package.json b/packages/vuesax/package.json index bc58824..1074b9f 100644 --- a/packages/vuesax/package.json +++ b/packages/vuesax/package.json @@ -3,15 +3,15 @@ "description": "vuesax with full vue3 and typescript support", "version": "0.0.11", "type": "module", - "main": "dist/lib/index.js", - "module": "dist/es/index.js", - "types": "dist/types/index.d.ts", + "main": "dist/index.umd.cjs", + "module": "dist/index.js", "exports": { ".": { - "import": "./dist/es/index.js", - "require": "./dist/lib/index.js" + "types": "./dist/src/index.d.ts", + "import": "./dist/index.js", + "require": "./dist/index.umd.cjs" }, - "./style.css": "./dist/es/style.css" + "./style.css": "./dist/style.css" }, "files": [ "dist" diff --git a/packages/vuesax/vite.config.ts b/packages/vuesax/vite.config.ts index a49daae..c21bcd6 100644 --- a/packages/vuesax/vite.config.ts +++ b/packages/vuesax/vite.config.ts @@ -14,40 +14,22 @@ export default defineConfig({ }, build: { lib: { - entry: 'src/index.ts' + entry: path.resolve(__dirname, 'src/index.ts'), + name: "vuesax-ts", + fileName: "index" }, - outDir: 'es', rollupOptions: { external: ['vue'], input: { index: 'src/index.ts', - }, - output: [ - { - format: 'es', - entryFileNames: '[name].js', - dir: 'dist/es', - preserveModulesRoot: 'src', - exports:"named" - }, - { - format: 'cjs', - entryFileNames: '[name].js', - dir: 'dist/lib', - preserveModulesRoot: 'src', - exports:"named" - } - ] + } } }, plugins: [ vue(), vueJsx(), - dts({ - outputDir: ['dist/lib', 'dist/es'], - tsConfigFilePath: './tsconfig.json', - entryRoot: 'src', - copyDtsFiles: true - }) + dts( + { outputDir: 'dist' } + ) ] })