markstream-vue2-cli
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMarkstream Vue 2 CLI
Markstream Vue 2 CLI
Use this skill when the host app is Vue 2 on Vue CLI or another Webpack 4-style stack.
当宿主项目是基于Vue CLI或其他Webpack 4类技术栈的Vue 2项目时,可使用本技能。
Workflow
工作流程
- Confirm the repo uses Vue 2 plus Vue CLI or Webpack 4-era tooling.
- Install and only the peers required for the requested features.
markstream-vue2 - Import in the app shell.
markstream-vue2/dist/index.css - Avoid Vite-style imports.
?worker- Use and
createKaTeXWorkerFromCDN(...)when workers are needed.createMermaidWorkerFromCDN(...)
- Use
- Prefer stable code block defaults over brittle Monaco wiring.
- plus
MarkdownCodeBlockNodeis safer than Monaco in Webpack 4-era repos.stream-markdown
- Validate with the smallest useful local dev or build command.
- 确认仓库使用Vue 2搭配Vue CLI或Webpack 4时代的工具链。
- 安装以及仅所需功能对应的依赖包。
markstream-vue2 - 在项目入口文件中导入。
markstream-vue2/dist/index.css - 避免使用Vite风格的导入方式。
?worker- 当需要Worker时,使用和
createKaTeXWorkerFromCDN(...)。createMermaidWorkerFromCDN(...)
- 当需要Worker时,使用
- 优先选择稳定的代码块默认设置,而非脆弱的Monaco配置。
- 在Webpack 4时代的仓库中,搭配
MarkdownCodeBlockNode比Monaco更安全。stream-markdown
- 在Webpack 4时代的仓库中,
- 通过最小化的本地开发或构建命令进行验证。
Default Decisions
默认决策
- Treat Monaco and worker-heavy setups as opt-in and fragile on Webpack 4.
- Prefer CDN workers over bundler workers for Mermaid and KaTeX.
- Keep the Vue 2 composition-api shim explicit when the repo is on Vue 2.6.
- 在Webpack 4环境下,将Monaco和依赖Worker较多的配置视为可选且易出问题的方案。
- 对于Mermaid和KaTeX,优先选择CDN Worker而非打包工具内置的Worker。
- 当仓库使用Vue 2.6时,明确保留Vue 2 composition-api垫片。
Useful Doc Targets
相关文档
docs/guide/vue2-quick-start.mddocs/guide/vue2-installation.mddocs/guide/troubleshooting.md
docs/guide/vue2-quick-start.mddocs/guide/vue2-installation.mddocs/guide/troubleshooting.md