Skip to content

Commit

Permalink
[GYMX-1014] build error with vite-dts, so switch back to vue-tsc
Browse files Browse the repository at this point in the history
  • Loading branch information
webdesignberlin committed Aug 6, 2024
1 parent 516c2f8 commit 2a19f33
Showing 5 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
"scripts": {
"dev": "vite",
"build": "npm run test:unit -- run --coverage && npm run build:storybook",
"build:lib": "rm -rf ./dist && vite build",
"build:lib": "rm -rf ./dist && vite build && vue-tsc --emitDeclarationOnly --project tsconfig.build-lib.json",
"build:storybook": "storybook build",
"preview": "vite preview",
"test:unit": "vitest",
4 changes: 2 additions & 2 deletions src/components/gymx-button/gymx-button.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<script lang="ts" setup>
import type { GymxButtonProps } from '@/components/gymx-button/types';
import type { UIState } from '@/types';
import type { GymxButtonProps } from './types';
import type { UIState } from '../..//types';
const props = withDefaults(defineProps<GymxButtonProps>(), {
tag: 'button',
2 changes: 1 addition & 1 deletion src/components/gymx-button/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { UIState } from '@/types';
import type { UIState } from '../../types';

export interface GymxButtonProps {
tag: 'button' | 'span' | 'a', // default button
7 changes: 3 additions & 4 deletions tsconfig.build-lib.json
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
"exclude": [ "node_modules", "src/**/*.test.ts", "src/**/*.stories.ts", "src/stories", "src/App.vue", "src/main.ts"],
"compilerOptions": {
"baseUrl": ".",
"target": "esnext",
"useDefineForClassFields": true,
"module": "esnext",
@@ -13,11 +14,10 @@
"esModuleInterop": true,
"lib": ["esnext", "dom"],
"declaration": true,
"emitDeclarationOnly": true,
"declarationDir": "./dist/types",
"isolatedModules": true,
"skipLibCheck": true,
"noEmit": true,
"noEmit": false,
"importHelpers": true,
"forceConsistentCasingInFileNames": true,
"types": [
@@ -26,6 +26,5 @@
"paths": {
"@/*": ["./src/*"]
}
},
"references": [{ "path": "./tsconfig.node.json" }]
}
}
4 changes: 2 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -10,9 +10,9 @@ export default defineConfig({
plugins: [
vue(),
svgLoader(),
dts({
/* dts({
tsconfigPath: './tsconfig.build-lib.json',
}),
}), */
],
resolve: {
alias: {

0 comments on commit 2a19f33

Please sign in to comment.