Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions .changeset/odd-bees-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@qwik.dev/devtools': patch
---

BUG: everyplugins just run in development environment
6 changes: 3 additions & 3 deletions packages/plugin/src/plugin/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type Plugin } from 'vite';
import VueInspector from 'vite-plugin-inspect';
import { devtoolsPlugin } from './devtools';
import qwikComponentProxy from './statistics';
import { statisticsPlugin } from './statistics';

// Re-export individual plugins
export { devtoolsPlugin } from './devtools';
Expand All @@ -12,8 +12,8 @@ export { devtoolsPlugin } from './devtools';
export function qwikDevtools(): Plugin[] {
return [
devtoolsPlugin(),
VueInspector(),
...qwikComponentProxy(),
{ ...VueInspector(), apply: 'serve' },
statisticsPlugin(),
// Add more plugins here as needed
];
}
9 changes: 2 additions & 7 deletions packages/plugin/src/plugin/statistics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export function statisticsPlugin(): Plugin {
return {
name: 'vite:qwik-component-proxy-transform',
enforce: 'post',

apply: 'serve',
transform(code, id) {
// Avoid rewriting imports inside the perf virtual module itself (otherwise `originalComponentQrl`
// could become self-referential/undefined)
Expand Down Expand Up @@ -295,9 +295,4 @@ export function statisticsPlugin(): Plugin {
attachSsrPerfInjectorMiddleware(server);
},
};
}

// Backwards compatible default export (existing callers spread a Plugin[])
export default function qwikComponentProxy(): Plugin[] {
return [statisticsPlugin()];
}
}
Loading