@mcpc-tech/unplugin-dev-inspector-mcp 0.1.8 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -16
- package/dist/cli.cjs +427 -389
- package/dist/cli.js +426 -383
- package/dist/config-updater.cjs +5 -5
- package/dist/config-updater.js +18 -18
- package/dist/index.cjs +29 -7
- package/dist/index.d.cts +17 -4
- package/dist/index.d.ts +17 -4
- package/dist/index.js +37 -16
- package/dist/next.cjs +5 -3
- package/dist/next.d.cts +7 -1
- package/dist/next.d.ts +7 -1
- package/dist/next.js +5 -3
- package/dist/standalone-server.js +1 -1
- package/package.json +1 -1
- package/dist/codemod-transformer.cjs +0 -4
- package/dist/codemod-transformer.js +0 -3
package/README.md
CHANGED
|
@@ -150,19 +150,17 @@ If you prefer to configure it manually:
|
|
|
150
150
|
|
|
151
151
|
If your project doesn't use HTML files (e.g., miniapp platforms that only bundle JS):
|
|
152
152
|
|
|
153
|
+
```typescript
|
|
154
|
+
// vite.config.ts
|
|
153
155
|
```typescript
|
|
154
156
|
// vite.config.ts
|
|
155
157
|
DevInspector.vite({
|
|
156
158
|
enabled: true,
|
|
157
|
-
autoInject: false // Disable HTML injection
|
|
159
|
+
autoInject: false, // Disable HTML injection
|
|
160
|
+
entry: 'src/main.ts' // Inject inspector into entry file
|
|
158
161
|
})
|
|
159
162
|
```
|
|
160
163
|
|
|
161
|
-
```typescript
|
|
162
|
-
// main.ts or app entry point
|
|
163
|
-
import 'virtual:dev-inspector-mcp'; // ← Add this import
|
|
164
|
-
```
|
|
165
|
-
|
|
166
164
|
##### TypeScript Types (Required for `virtual:dev-inspector-mcp`)
|
|
167
165
|
|
|
168
166
|
If you use TypeScript and import `virtual:dev-inspector-mcp`, make sure your TS config includes the plugin client types:
|
|
@@ -270,15 +268,6 @@ export default function RootLayout({ children }) {
|
|
|
270
268
|
|
|
271
269
|
### React Router v7+
|
|
272
270
|
|
|
273
|
-
Since React Router handles HTML generation via its own SSR/SPA mechanism, it bypasses the standard Vite HTML transformation hooks. You need to manually import the virtual module in your entry file.
|
|
274
|
-
|
|
275
|
-
```typescript
|
|
276
|
-
// app/root.tsx or app/entry.client.tsx
|
|
277
|
-
import 'virtual:dev-inspector-mcp';
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
And ensure your `vite.config.ts` has the plugin:
|
|
281
|
-
|
|
282
271
|
```typescript
|
|
283
272
|
// vite.config.ts
|
|
284
273
|
import { reactRouter } from "@react-router/dev/vite";
|
|
@@ -286,7 +275,10 @@ import DevInspector from '@mcpc-tech/unplugin-dev-inspector-mcp';
|
|
|
286
275
|
|
|
287
276
|
export default defineConfig({
|
|
288
277
|
plugins: [
|
|
289
|
-
DevInspector.vite({
|
|
278
|
+
DevInspector.vite({
|
|
279
|
+
enabled: true,
|
|
280
|
+
entry: "app/root.tsx" // Inject inspector into root layout
|
|
281
|
+
}),
|
|
290
282
|
reactRouter(),
|
|
291
283
|
],
|
|
292
284
|
});
|