Vue SFC support (Vetur) not working for you? There are simple ways out. (Possibly also other SFC's, e.g. Svelte.)
As I have complained about TypeScript support in SFC's, including Vue and Svelte. There seem to be simple ways out, at least for Vue.
As I have complained about TypeScript support in SFC's, including Vue and Svelte. There seem to be simple ways out, at least for Vue.
This was created by
/media/
/post/**/*.md
/theme.yml
# Shared commands
brew install git-filter-repo # https://github.com/newren/git-filter-repo/blob/main/INSTALL.md
This can easily be done with Slots and Component :is
.
<template lang="pug">
#App
component(v-if="layout" :is="layout")
router-view
router-view(v-else)
</template>
<script lang="ts">
import { Vue, Component, Watch } from 'vue-property-decorator'
@Component
export default class App extends Vue {
get layout () {
const layout = this.$route.meta.layout
return layout ? `${layout}-layout` : null
}
}
</script>
And it fallbacks to Blank Layout.
As a lover of TypeScript InteliSense and Vue, I have always tried to use TypeScript in Vue, but Vetur isn't as smart as it should…
*.ts
.So, I have found some fixes --
Pug is a high-performance template engine heavily influenced by Haml and implemented with JavaScript for Node.js and browsers.
Pug uses whitespace syntax, and is Tab / Space -sensitive, just like Markdown and Python
Pug is mainly a template engine for Node.js, and cannot be installed for Webpack via NPM/Yarn, however there is https://github.com/pugjs/pug#browser-support but it is a very large file. However, I created HyperPug a while ago, and it is relatively small.