Skip to content

Commit fdfdb73

Browse files
committed
feat: update reademe
1 parent c8cfe96 commit fdfdb73

File tree

11 files changed

+949
-761
lines changed

11 files changed

+949
-761
lines changed

docs/en/guide/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ No intrusion into the source code, effective by simply including it in the bundl
2424

2525
### Strong Adaptability
2626

27-
Supports usage in `webpack/vite/rspack/rsbuild/esbuild/farm/nextjs/nuxt/umijs`, and supports multiple frameworks such as `Vue/React/Preact/Solid/Qwik/Svelte/Astro`.
27+
Supports usage in `webpack/vite/rspack/rsbuild/esbuild/farm/mako`, and supports multiple frameworks such as `vue/react/preact/solid/qwik/svelte/astro/nextjs/nuxt/umijs`.

docs/en/guide/start.md

Lines changed: 97 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Quick Start
22

3-
`code-inspector-plugin` supports projects using `webpack/vite/rspack/rsbuild/esbuild/farm/nextjs/nuxt/umijs` as bundlers, and works with frameworks like `vue/react/preact/solid/qwik/svelte/astro`. Please refer to the following integration guide.
3+
`code-inspector-plugin` supports projects using `webpack/vite/rspack/rsbuild/esbuild/farm/mako` as bundlers, and works with frameworks like `vue/react/preact/solid/qwik/svelte/astro/nextjs/nuxt/umijs`. Please refer to the following integration guide.
44

55
## Installation
66

@@ -162,130 +162,135 @@ module.exports = {
162162

163163
::: details Click to view nuxt project configuration
164164

165-
nuxt3.x:
165+
- nuxt3.x:
166166

167-
```js
168-
// nuxt.config.js
169-
import { codeInspectorPlugin } from 'code-inspector-plugin';
167+
```js
168+
// nuxt.config.js
169+
import { codeInspectorPlugin } from 'code-inspector-plugin';
170170

171-
// https://nuxt.com/docs/api/configuration/nuxt-config
172-
export default defineNuxtConfig({
173-
vite: {
174-
plugins: [codeInspectorPlugin({ bundler: 'vite' })],
175-
},
176-
});
177-
```
171+
// https://nuxt.com/docs/api/configuration/nuxt-config
172+
export default defineNuxtConfig({
173+
vite: {
174+
plugins: [codeInspectorPlugin({ bundler: 'vite' })],
175+
},
176+
});
177+
```
178178

179-
nuxt2.x:
179+
- nuxt2.x:
180180

181-
```js
182-
// nuxt.config.js
183-
import { codeInspectorPlugin } from 'code-inspector-plugin';
181+
```js
182+
// nuxt.config.js
183+
import { codeInspectorPlugin } from 'code-inspector-plugin';
184184

185-
export default {
186-
build: {
187-
extend(config) {
188-
config.plugins.push(codeInspectorPlugin({ bundler: 'webpack' }));
189-
return config;
185+
export default {
186+
build: {
187+
extend(config) {
188+
config.plugins.push(codeInspectorPlugin({ bundler: 'webpack' }));
189+
return config;
190+
},
190191
},
191-
},
192-
};
193-
```
192+
};
193+
```
194194

195195
:::
196196

197197
::: details Click to view next.js project configuration
198198

199-
next <= 14.x :
199+
- next <= 14.x :
200200

201-
```js
202-
// next.config.js
203-
const { codeInspectorPlugin } = require('code-inspector-plugin');
201+
```js
202+
// next.config.js
203+
const { codeInspectorPlugin } = require('code-inspector-plugin');
204204

205-
const nextConfig = {
206-
webpack: (config, { dev, isServer }) => {
207-
config.plugins.push(codeInspectorPlugin({ bundler: 'webpack' }));
208-
return config;
209-
},
210-
};
205+
const nextConfig = {
206+
webpack: (config, { dev, isServer }) => {
207+
config.plugins.push(codeInspectorPlugin({ bundler: 'webpack' }));
208+
return config;
209+
},
210+
};
211211

212-
module.exports = nextConfig;
213-
```
212+
module.exports = nextConfig;
213+
```
214214

215-
next 15.0.x ~ 15.2.x :
215+
- next 15.0.x ~ 15.2.x :
216216

217-
```js
218-
// next.config.js
219-
import type { NextConfig } from 'next';
220-
import { codeInspectorPlugin } from 'code-inspector-plugin';
217+
```js
218+
// next.config.js
219+
import type { NextConfig } from 'next';
220+
import { codeInspectorPlugin } from 'code-inspector-plugin';
221221

222-
const nextConfig: NextConfig = {
223-
experimental: {
224-
turbo: {
225-
rules: codeInspectorPlugin({
226-
bundler: 'turbopack',
227-
}),
222+
const nextConfig: NextConfig = {
223+
experimental: {
224+
turbo: {
225+
rules: codeInspectorPlugin({
226+
bundler: 'turbopack',
227+
}),
228+
},
228229
},
229-
},
230-
};
230+
};
231231

232-
export default nextConfig;
233-
```
232+
export default nextConfig;
233+
```
234234

235-
next >= 15.3.x :
235+
- next >= 15.3.x :
236236

237-
```js
238-
// next.config.js
239-
import type { NextConfig } from 'next';
240-
import { codeInspectorPlugin } from 'code-inspector-plugin';
237+
```js
238+
// next.config.js
239+
import type { NextConfig } from 'next';
240+
import { codeInspectorPlugin } from 'code-inspector-plugin';
241241

242-
const nextConfig: NextConfig = {
243-
turbopack: {
244-
rules: codeInspectorPlugin({
245-
bundler: 'turbopack',
246-
}),
247-
},
248-
};
242+
const nextConfig: NextConfig = {
243+
turbopack: {
244+
rules: codeInspectorPlugin({
245+
bundler: 'turbopack',
246+
}),
247+
},
248+
};
249249

250-
export default nextConfig;
251-
```
250+
export default nextConfig;
251+
```
252252

253253
:::
254254

255255
::: details Click to view umi.js project configuration
256256

257-
```js
258-
// umi.config.js or umirc.js
259-
import { defineConfig } from '@umijs/max';
260-
import { codeInspectorPlugin } from 'code-inspector-plugin';
257+
- With webpack:
261258

262-
export default defineConfig({
263-
chainWebpack(memo) {
264-
memo.plugin('code-inspector-plugin').use(
265-
codeInspectorPlugin({
266-
bundler: 'webpack',
267-
})
268-
);
269-
},
270-
// other config
271-
});
272-
```
259+
```js
260+
// umi.config.js or umirc.js
261+
import { defineConfig } from '@umijs/max';
262+
import { codeInspectorPlugin } from 'code-inspector-plugin';
273263

274-
:::
264+
export default defineConfig({
265+
chainWebpack(memo) {
266+
memo.plugin('code-inspector-plugin').use(
267+
codeInspectorPlugin({
268+
bundler: 'webpack',
269+
})
270+
);
271+
},
272+
// other config
273+
});
274+
```
275275

276-
::: details Click to view astro project configuration
276+
- With mako:
277277

278-
```js
279-
// astro.config.mjs
280-
import { defineConfig } from 'astro/config';
281-
import { codeInspectorPlugin } from 'code-inspector-plugin';
278+
```ts
279+
// .umirc.ts
280+
import { defineConfig } from 'umi';
281+
import { codeInspectorPlugin } from 'code-inspector-plugin';
282282

283-
export default defineConfig({
284-
vite: {
285-
plugins: [codeInspectorPlugin({ bundler: 'vite' })],
286-
},
287-
});
288-
```
283+
export default defineConfig({
284+
// other config...
285+
mako: {
286+
plugins: [
287+
codeInspectorPlugin({
288+
bundler: 'mako',
289+
}),
290+
],
291+
},
292+
});
293+
```
289294

290295
:::
291296

docs/zh/guide/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222

2323
### 适配性强
2424

25-
支持在 `webpack/vite/rspack/rsbuild/esbuild/farm/nextjs/nuxt/umijs` 中使用,支持 `vue/react/preact/solid/qwik/svelte/astro` 等多个框架
25+
支持在 `webpack/vite/rspack/rsbuild/esbuild/farm/mako` 中使用,支持 `vue/react/preact/solid/qwik/svelte/astro/nextjs/nuxt/umijs` 等多个框架

0 commit comments

Comments
 (0)