
Security News
US Government Forces Anthropic to Pull Claude Fable Days After Launch
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.
@mieditor/react
Advanced tools
`@mieditor/react` 为 React + Vite 项目提供 UI Editor 开发期集成。插件会在 JSX/TSX 中注入 `data-mi-editor-id`,收集元素样式元数据,并提供编辑面板所需的开发服务器接口。
@mieditor/react 为 React + Vite 项目提供 UI Editor 开发期集成。插件会在 JSX/TSX 中注入 data-mi-editor-id,收集元素样式元数据,并提供编辑面板所需的开发服务器接口。
npm install -D @mieditor/react
项目中还需要使用 Vite:
npm install -D vite @vitejs/plugin-react
在 vite.config.ts 中加入插件:
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { miEditorReact } from "@mieditor/react";
export default defineConfig({
plugins: [miEditorReact(), react()],
});
如果同时使用 Tailwind Vite 插件,可以保持 UI Editor 在前:
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
import { miEditorReact } from "@mieditor/react";
export default defineConfig({
plugins: [miEditorReact(), tailwindcss(), react()],
});
启动 Vite 开发服务器后,页面会自动加载编辑运行时和面板。
miEditorReact({
tailwind: {
cssEntry: "src/index.css",
},
inject: "html",
});
tailwind.cssEntry:指定 Tailwind 入口 CSS 文件。inject:控制脚本注入方式,支持 true、false、"html" 和 "middleware"。默认会通过 Vite transformIndexHtml 注入。style。className。import { miEditorReact } from "@mieditor/react";
import { instrumentCode } from "@mieditor/react/instrumentation";
import {
applyInlineStylePatch,
applyClassNamePatchSmartFile,
} from "@mieditor/react/patchers";
多数业务项目只需要使用 miEditorReact()。
仓库内示例:examples/react-vite-demo。
启动示例:
npm run dev:react
交流 QQ 群:1105427697
className 不能保证可回写。FAQs
`@mieditor/react` 为 React + Vite 项目提供 UI Editor 开发期集成。插件会在 JSX/TSX 中注入 `data-mi-editor-id`,收集元素样式元数据,并提供编辑面板所需的开发服务器接口。
The npm package @mieditor/react receives a total of 9 weekly downloads. As such, @mieditor/react popularity was classified as not popular.
We found that @mieditor/react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.