Skip to content

Commit

Permalink
fix(vue): types
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed May 30, 2022
1 parent 7716faa commit a2fa1e9
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 6 deletions.
7 changes: 4 additions & 3 deletions packages/vue/build/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ const transformToVueComponent = async (file: string) => {
${content}
</template>
<script lang="ts">
export default {
name: "${componentName}",
}
import { defineComponent } from 'vue'
export default defineComponent({
name: "${componentName}",
})
</script>`,
'vue'
)
Expand Down
1 change: 1 addition & 0 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"@pnpm/find-workspace-packages": "^4.0.9",
"@pnpm/logger": "^4.0.0",
"@types/fs-extra": "^9.0.13",
"@types/node": "^17.0.36",
"@types/prettier": "^2.6.3",
"camelcase": "^6.3.0",
"chalk": "^5.0.1",
Expand Down
17 changes: 17 additions & 0 deletions packages/vue/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"compilerOptions": {
"composite": true,
"target": "ES2021",
"module": "ESNext",
"lib": ["ES2021"],
"baseUrl": ".",
"strict": true,
"noImplicitAny": true,
"moduleResolution": "node",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"types": ["node"],
"skipLibCheck": true
},
"include": ["build"]
}
6 changes: 3 additions & 3 deletions packages/vue/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"compilerOptions": {
"module": "ESNext",
"declaration": true,
"emitDeclarationOnly": true,
"baseUrl": ".",
"declarationDir": "./dist/types",
"strict": true,
Expand All @@ -14,8 +13,9 @@
"sourceMap": true,
"lib": ["ES2018", "DOM"],
"allowSyntheticDefaultImports": true,
"skipLibCheck": true
"skipLibCheck": true,
"types": []
},
"include": ["./src/**/*"],
"exclude": ["node_modules"]
"references": [{ "path": "./tsconfig.build.json" }]
}
2 changes: 2 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a2fa1e9

Please sign in to comment.