Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions content/1.guide/1.introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: CRXJS provides a smooth hot-reload browser extension development ex
icon: 'lucide:info'
---

CRXJS is committed to providing developers with an efficient, modern browser extension development experience. By directly parsing the manifest.json file, it enables a zero-configuration development workflow and supports global Hot Module Replacement (HMR) including content scripts.
CRXJS is committed to providing developers with an efficient, modern browser extension development experience. By directly parsing the manifest.json file, it enables a zero-configuration development workflow and supports global Hot Module Replacement (HMR), including content scripts in both the isolated world and main world since [@crxjs/vite-plugin v2.7.0](https://github.com/crxjs/chrome-extension-tools/releases/tag/vite-plugin-v2.7.0).
CRXJS is compatible with major frontend frameworks and suitable for various technology stacks, helping developers focus on feature implementation without worrying about tedious build and configuration details.

## Background and Motivation
Expand All @@ -21,7 +21,7 @@ CRXJS provides a unified, concise and efficient solution to the above problems.

- **Hot Module Replacement (HMR)**

Supports global hot updates including content scripts and page scripts. During development, code changes can be reflected immediately without manual refresh or extension reload, significantly improving development efficiency.
Supports global hot updates for page scripts and for content scripts in both the isolated world and main world since [@crxjs/vite-plugin v2.7.0](https://github.com/crxjs/chrome-extension-tools/releases/tag/vite-plugin-v2.7.0). During development, code changes can be reflected immediately without manual refresh or extension reload, significantly improving development efficiency.

- **Zero Configuration Development**

Expand Down
4 changes: 3 additions & 1 deletion content/2.concepts/4.content.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
title: Content Scripts
description: CRXJS provides content scripts with Vite HMR.
description: CRXJS provides Vite HMR for isolated and main world content scripts since v2.7.0.
icon: 'lucide:code-xml'
---

Since [@crxjs/vite-plugin v2.7.0](https://github.com/crxjs/chrome-extension-tools/releases/tag/vite-plugin-v2.7.0), content script HMR works in both Chrome's isolated world and main world.

## Static Assets

Feel free to import static assets! CRXJS automatically declares imported content
Expand Down
4 changes: 2 additions & 2 deletions content/zh/1.guide/1.introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ icon: 'lucide:info'



CRXJS 致力于为开发者提供高效、现代化的浏览器扩展开发体验。它通过直接解析 manifest.json 文件,实现了零配置的开发流程,并支持包括内容脚本在内的全局热模块替换(HMR)。
CRXJS 致力于为开发者提供高效、现代化的浏览器扩展开发体验。它通过直接解析 manifest.json 文件,实现了零配置的开发流程,并支持包括内容脚本在内的全局热模块替换(HMR);从 [@crxjs/vite-plugin v2.7.0](https://github.com/crxjs/chrome-extension-tools/releases/tag/vite-plugin-v2.7.0) 起,内容脚本 HMR 同时支持隔离世界(isolated world)和主世界(main world)
CRXJS 兼容主流前端框架,适用于多种技术栈,帮助开发者专注于功能实现,而无需关注繁琐的构建和配置细节。

## 背景与动机
Expand All @@ -24,7 +24,7 @@ CRXJS 针对上述问题,提供了统一、简洁且高效的解决方案。

- **热模块替换(HMR)**

支持包括内容脚本、页面脚本在内的全局热更新。开发过程中,代码变更可即时反映,无需手动刷新或重载扩展,显著提升开发效率。
支持页面脚本,以及从 [@crxjs/vite-plugin v2.7.0](https://github.com/crxjs/chrome-extension-tools/releases/tag/vite-plugin-v2.7.0) 起同时运行在隔离世界(isolated world)和主世界(main world)的内容脚本的全局热更新。开发过程中,代码变更可即时反映,无需手动刷新或重载扩展,显著提升开发效率。

- **零配置开发**

Expand Down
4 changes: 3 additions & 1 deletion content/zh/2.concepts/4.content.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
title: 内容脚本(Content Scripts)
description: CRXJS为内容脚本提供Vite HMR。
description: CRXJS 从 v2.7.0 起为隔离世界和主世界内容脚本提供 Vite HMR。
icon: 'lucide:code-xml'
---

从 [@crxjs/vite-plugin v2.7.0](https://github.com/crxjs/chrome-extension-tools/releases/tag/vite-plugin-v2.7.0) 起,内容脚本 HMR 同时支持 Chrome 的隔离世界(isolated world)和主世界(main world)。

## 静态资源

可以随意导入静态资源!CRXJS会自动将导入的内容脚本依赖项声明为清单中的`web_accessible_resources`。
Expand Down