Hello,
I didn't manage to make the plugin work. I made it this far from now. It seams to parse the file as it should but I still have a compiler issue.

I don't know what I should do next to deal with this. next you'll find vite config file and my minimal vue template and md file :
vite-config.ts
import { defineConfig } from 'vite'
import {plugin as mdPlugin, Mode} from 'vite-plugin-markdown'
import vue from '@vitejs/plugin-vue'
import { fileURLToPath, URL } from 'node:url';
// https://vitejs.dev/config/
export default defineConfig({
base: '/',
plugins: [
vue({
include: [/\.vue$/, /\.md$/],
}),
mdPlugin({
mode: [
Mode.HTML,
// Mode.TOC,
Mode.VUE
],
}),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
buffer: 'buffer',
},
},
optimizeDeps: {
include: ['buffer']
},
server: {
watch: {
usePolling: true,
}
},
build: {
sourcemap: true,
},
})
vue component where I want to import my md file
<script setup lang="ts">
import { attributes, html, VueComponent, VueComponentWith } from '@/assets/portfolio/project-1.md'
console.log("attributs :", attributes)
</script>
<template>
</section>
</template>
my md file as test
---
title: "Application UCPA - Storyline"
slug: "project-1"
description: "le texte qui va bien"
tags: ["UI", "Art", "direction"]
thumbnail: "https://c.animaapp.com/57i96tuF/img/image-7@2x.png"
contentType: "image"
script: <script>console.log("hello")</script>
---
# Title from Project 1
> content and all stuff
Something
Thank for any help.
Hello,
I didn't manage to make the plugin work. I made it this far from now. It seams to parse the file as it should but I still have a compiler issue.
I don't know what I should do next to deal with this. next you'll find vite config file and my minimal vue template and md file :
Thank for any help.