Skip to content

Commit 1a6eff3

Browse files
committed
docs: add vueLoader param docs
1 parent 725ca93 commit 1a6eff3

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

docs/en/api/advance.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,11 @@ window.addEventListener('code-inspector:trackCode', () => {
225225
- Description: Skip injecting certain code snippets:
226226
- `console`: Skip injecting `console.error` and `console.warn` code snippets, it's not recommended to skip this item for nextjs and nuxt projects
227227
- `htmlScript`: Skip injecting `script` tags in html, it's not recommended to skip this item for MPA projects
228+
229+
## vueLoader <Badge type="tip" text="1.6.4+" vertical="middle" />
230+
231+
- Optional
232+
- Type: `'custom' | 'internal'`, default value is `'custom'`
233+
- Description: Vue file compilation method, only effective for `webpack/rspack/rsbuild` projects
234+
- `'custom'`: Use `code-inspector-plugin` custom loader injection, the advantage is strong compatibility, but may cause scoped css to fail in some vue projects in production environment
235+
- `'internal'`: Use `vue-loader` internal compiler node transform, which can solve the problem of scoped css failure in production environment, but is not compatible with low version vue compiler

docs/zh/api/advance.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,3 +226,11 @@ window.addEventListener('code-inspector:trackCode', () => {
226226
- 说明:跳过注入某些代码片段:
227227
- `console`:跳过注入 `console.error``console.warn` 的代码片段,nextjs 和 nuxt 项目不建议跳过此项
228228
- `htmlScript`:跳过在 html 中注入 script 标签的代码片段,MPA 项目不建议跳过此项
229+
230+
## vueLoader <Badge type="tip" text="1.6.4+" vertical="middle" />
231+
232+
- 可选项。
233+
- 类型:`'custom' | 'internal'`,默认值为 `'custom'`
234+
- 说明:Vue 文件的编译方式,仅对 `webpack/rspack/rsbuild` 项目生效
235+
- `'custom'`:使用 `code-inspector-plugin` 自定义的 loader 注入,优点是兼容性强,部分 vue 项目生产环境使用可能导致 scoped css 失效
236+
- `'internal'`:使用 `vue-loader` 内部 compiler node transform,可以解决生产环境 scoped css 失效问题,但是低版本 vue compiler 不兼容

0 commit comments

Comments
 (0)