{ "name": "vite-plugin-vue-preview", "type": "module", "version": "1.3.0", "private": false, "packageManager": "pnpm@8.6.5", "description": "a vite plugin for vue preview in markdown", "author": "liting <luz.liting@gmail.com>", "license": "MIT", "homepage": "https://...
import{createApp}from'vue';importAppfrom'./App.vue';importPreviewfrom'vite-plugin-vue-component-preview/client';constapp=createApp(App);app.use(Preview); tsconfig.json(For IDE and vue-tsc support) {"vueCompilerOptions": {"plugins": ["vite-plugin-vue-component-preview/tooling"] } } ...
a vite plugin for code preview / 一个代码预览插件. Contribute to litingyes/vite-plugin-vue-preview development by creating an account on GitHub.
_下方代码块将会被解析为 vue 组件并展示_```vuepreview<template>我是 vue 模板</template>``` 经过vite-plugin-markdown-preview处理后: 自定义预览组件 如果默认的样式不能满足需求,可以全局注册一个CodePreview组件来代替默认组件。 app.component('CodePreview',MyCodePreview) ...
"preview": "vite preview" }, "dependencies": { "vue": "^3.3.4" }, "devDependencies": { "@vitejs/plugin-vue": "^4.2.3", "typescript": "^5.0.2", "vite": "^4.4.5", "vue-tsc": "^1.8.5" } } 我们挑几个重要的说一说 ...
1.1、利用Vite创建Vue项目的命令 npm: npm create vite@latest yarn: yarn create vite pnpm: pnpm create vite (1)提示需要安装(create-vite@5.2.1)此包,是否继续 ? 我们填写 y(yes)按 回车键,进入下一步。 (2)输入要创建的项目名称,按 回车键 进入下一步。
vite+Ts+Vue3搭建的项目中,把Ts类型文件抽离出去,再导入到页面组件时,出现“导入路径不能以“.ts”扩展名结束”的爆红错误,但这个错误并不影响项目运行。 解决方法: import { defineConfig } from 'vite'import vue from'@vitejs/plugin-vue'import path from 'path'//https://vitejs.dev/config/exportdefa...
在使用Vite-plugin-markdown-preview之前,我们首先需要安装Vite。Vite是一个由Vue.js核心团队开发的轻量级前端构建工具,它具有快速的冷启动和热模块替换能力,非常适合于构建现代化的前端项目。你可以在终端中运行以下命令来全局安装Vite: shell npm install -g create-vite 步骤二:创建Vite项目 安装完成Vite之后,我们可...
"preview": "vite preview" }, "dependencies": { "@types/node": "^17.0.6", "element-plus": "^1.3.0-beta.1", "vue": "^3.2.26", "vue-router": "^4.0.12" }, "devDependencies": { "@vitejs/plugin-vue": "^2.0.0", "@vitejs/plugin-vue-jsx": "^1.3.10", "@vue/compiler...
"preview": "vite preview --port 4173" }, "dependencies": { "ant-design-vue": "^3.2.17", "axios": "^1.2.2", "echarts": "^5.4.2", "guess": "^1.0.2", "html2canvas": "^1.4.1", "vue": "^3.2.37", "vue-router": "^4.2.5", ...