Chuyển đến nội dung
Skillpedia
Website và giao diện (frontend)48k · #5175

markstream-vue2-cli

Skill này làm gì

Công cụ này giúp dùng thư viện 'markstream-vue2' trong các dự án Vue 2 cũ hơn, sử dụng Vue CLI hoặc Webpack 4. Nó đảm bảo CSS hoạt động đúng và cung cấp giải pháp thay thế cho các tính năng hiện đại có thể không tương thích.

Khi nào nên dùng

  • ✓Khi dự án Vue 2 của bạn dùng Vue CLI hoặc Webpack 4.
  • ✓Khi bạn không thể dùng các tính năng hiện đại như 'package export maps' hoặc 'Vite worker imports'.
  • ✓Khi bạn muốn tích hợp 'markstream-vue2' mà không làm hỏng dự án hiện có.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/markstream-vue2-cli/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/markstream-vue2-cli/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Làm sao để dùng markstream-vue2 trong dự án Vue 2 với Webpack 4 của tôi?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ điều chỉnh cách 'markstream-vue2' được import và cấu hình để phù hợp với giới hạn của Vue CLI và Webpack 4. Nó import CSS riêng và dùng các giải pháp thay thế cho các tính năng như workers.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Markstream Vue 2 CLI

Overview

Handle Vue CLI and Webpack 4 constraints that differ materially from modern Vue 2/Vite setup.

When to Use

Use when Vue 2 runs on Vue CLI or Webpack 4 and package export maps or Vite worker imports are unavailable.

Workflow

Inspect the existing package manager, installed package version and project conventions. A requested scoped integration already authorizes routine source/dependency edits; seek approval only for a material scope expansion or unresolved beta/alpha adoption decision.

  1. Confirm Vue 2 plus Vue CLI/Webpack 4.
  2. Install markstream-vue2 and only requested peers.
  3. Import markstream-vue2/dist/index.css, because legacy tooling may not understand the CSS export map.
  4. Avoid ?worker imports. Use Markstream CDN worker helpers for KaTeX or Mermaid only when needed.
  5. Prefer stream-markdown code blocks over fragile Monaco worker wiring.
  6. Keep content with smooth streaming for chat; set final and disable pacing/cursor for completed history.
  7. Keep HTML safe and Mermaid strict; validate the actual legacy build.

Example

<script>
import MarkdownRender from 'markstream-vue2'
// Legacy Webpack may not resolve the package CSS export map.
import 'markstream-vue2/dist/index.css'

export default {
  components: { MarkdownRender },
  data: () => ({ content: '# Answer', done: false }),
}
</script>

<template>
  <MarkdownRender
    :content="content"
    :final="done"
    :fade="false"
  />
</template>

Limitations

  • CDN workers require network access and compatible content-security policy.
  • Monaco-style worker setups are intentionally not covered.
  • Vue 2.6 may also require @vue/composition-api.

Security & Safety Notes

Do not introduce CDN workers without reviewing CSP, network policy, and dependency trust. Preserve safe rendering defaults.

Verify props, export paths and peer ranges against the installed package, not a mutable upstream main. Test partial and completed streams, malformed/untrusted Markdown, links and image URLs, cancellation and reduced motion. Safe HTML and strict diagrams reduce exposure but do not alone enforce URL/network privacy or application component permissions.

Vue 2 is end-of-life; preserve a requested legacy integration and document its maintenance/support decision rather than silently upgrading the whole application. Prefer reviewed locally bundled workers over mutable CDN code where feasible.

Câu hỏi thường gặp

“Package export maps” là gì?

Đây là cách tổ chức và import các phần của thư viện JavaScript hiện đại hơn. Các dự án cũ có thể không hiểu kiểu tổ chức này.

“CDN worker fallbacks” là gì?

Đây là các giải pháp thay thế để chạy một số tác vụ (như hiển thị công thức toán) bằng mã tải từ internet (CDN), nếu phương pháp chính không hoạt động trong môi trường của bạn.

Vì sao dùng “conservative code-block defaults”?

Nghĩa là công cụ dùng các thiết lập an toàn và đơn giản hơn cho khối mã, tránh các vấn đề tương thích hoặc bảo mật trong môi trường cũ.

Chi tiết

Mô tả gốc của tác giả

Integrate markstream-vue2 into Vue CLI or Webpack 4 with export-map-safe CSS, CDN worker fallbacks, and conservative code-block defaults.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#5175
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự