umijs / dumi

📖 Static Site Generator for component library development
https://d.umijs.org
MIT License
3.61k stars 1.18k forks source link

fix: livedemo disabled when config babel-plugin-import #2195

Closed Jinbao1001 closed 2 months ago

Jinbao1001 commented 2 months ago

🤔 这个变动的性质是?/ What is the nature of this change?

🔗 相关 Issue / Related Issue

2193

💡 需求背景和解决方案 / Background or solution

用户配置按需加载后, babel-plugin-import 会擦除 dumi 注入 livedemo context的相关 import * as 语句, 导致 context 内的变量未定义

why 禁用 ?

浏览器用户源码编译是不经过 babel-plugin 处理的, 目前也没有必要改变这一现状. 禁用一不会报错, 二不会影响存量用户.

📝 更新日志 / Changelog

Language Changelog
🇺🇸 English livedemo disabled when config babel-plugin-import
🇨🇳 Chinese 配置按需加载后禁用liveDemo
vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dumi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 9, 2024 6:06am