Skip to content

Commit

Permalink
fix: update vite-plugin-dts version which fixes build issue on docker…
Browse files Browse the repository at this point in the history
…/alpine (hoppscotch#3179)
  • Loading branch information
anwarulislam authored Jul 17, 2023
1 parent 6928eb7 commit 25177bd
Show file tree
Hide file tree
Showing 4 changed files with 223 additions and 153 deletions.
2 changes: 1 addition & 1 deletion packages/hoppscotch-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"unplugin-vue-components": "^0.21.0",
"vite": "^3.2.3",
"vite-plugin-checker": "^0.5.1",
"vite-plugin-dts": "2.0.0-beta.3",
"vite-plugin-dts": "3.2.0",
"vite-plugin-fonts": "^0.6.0",
"vite-plugin-html-config": "^1.0.10",
"vite-plugin-inspect": "^0.7.4",
Expand Down
91 changes: 42 additions & 49 deletions packages/hoppscotch-ui/src/components/smart/Anchor.vue
Original file line number Diff line number Diff line change
@@ -1,62 +1,55 @@
<template>
<HoppSmartLink :to="to" :exact="exact" :blank="blank" class="inline-flex items-center justify-center focus:outline-none"
<HoppSmartLink
:to="to"
:exact="exact"
:blank="blank"
class="inline-flex items-center justify-center focus:outline-none"
:class="[
color
? `text-${color}-500 hover:text-${color}-600 focus-visible:text-${color}-600`
: 'hover:text-secondaryDark focus-visible:text-secondaryDark',
{ 'opacity-75 cursor-not-allowed': disabled },
{ 'flex-row-reverse': reverse },
]" :disabled="disabled" tabindex="0">
<component :is="icon" v-if="icon" class="svg-icons" :class="label ? (reverse ? 'ml-2' : 'mr-2') : ''" />
]"
:disabled="disabled"
tabindex="0"
>
<component
:is="icon"
v-if="icon"
class="svg-icons"
:class="label ? (reverse ? 'ml-2' : 'mr-2') : ''"
/>
{{ label }}
</HoppSmartLink>
</template>

<script lang="ts">
import HoppSmartLink from "./Link.vue";
import { Component, defineComponent, PropType } from "vue"
<script setup lang="ts">
import HoppSmartLink from "./Link.vue"
import { Component } from "vue"
export default defineComponent({
components: {
HoppSmartLink
},
props: {
to: {
type: String,
default: "",
},
exact: {
type: Boolean,
default: true,
},
blank: {
type: Boolean,
default: false,
},
label: {
type: String,
default: "",
},
icon: {
type: Object as PropType<Component | null>,
default: null,
},
svg: {
type: Object as PropType<Component | null>,
default: null,
},
color: {
type: String,
default: "",
},
disabled: {
type: Boolean,
default: false,
},
reverse: {
type: Boolean,
default: false,
},
},
})
withDefaults(
defineProps<{
to: string
exact: boolean
blank: boolean
label: string
icon: Component | null
svg: Component | null
color: string
disabled: boolean
reverse: boolean
}>(),
{
to: "",
exact: true,
blank: false,
label: "",
icon: null,
svg: null,
color: "",
disabled: false,
reverse: false,
}
)
</script>
7 changes: 3 additions & 4 deletions packages/hoppscotch-ui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ export default defineConfig({
vue(),
dts({
insertTypesEntry: true,
skipDiagnostics: true,
outputDir: ['dist']
outDir: ["dist"],
}),
WindiCSS({
root: path.resolve(__dirname),
}),
Icons({
compiler: "vue3"
compiler: "vue3",
}),
VitePluginFonts({
google: {
Expand All @@ -45,6 +44,6 @@ export default defineConfig({
exports: "named",
},
},
emptyOutDir: true
emptyOutDir: true,
},
})
Loading

0 comments on commit 25177bd

Please sign in to comment.