Skip to content

Commit

Permalink
fix: Accidentally removed conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
rschristian committed Mar 16, 2024
1 parent 0f178cb commit 19ca2f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/devtools.ts
Expand Up @@ -62,8 +62,8 @@ export function preactDevtoolsPlugin({
transform(code, url) {
const { id } = parseId(url);

if (entry === id) {
const source = devToolsEnabled ? "preact/devtools" : "preact/debug";
if (entry === id && devToolsEnabled) {
const source = devtoolsInProd ? "preact/devtools" : "preact/debug";
code = `import "${source}";\n${code}`;

log(`[inject] ${kl.cyan(source)} -> ${kl.dim(id)}`);
Expand Down

0 comments on commit 19ca2f4

Please sign in to comment.