From f50ff2c168584b5c83d64b9e3b845c1a98d46649 Mon Sep 17 00:00:00 2001 From: sapphi-red Date: Thu, 23 Jun 2022 01:19:55 +0900 Subject: [PATCH] add entries to optimizeDeps --- src/devtools.ts | 8 ++++++++ src/index.ts | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/devtools.ts b/src/devtools.ts index 9ca48ee..19239cc 100644 --- a/src/devtools.ts +++ b/src/devtools.ts @@ -27,6 +27,14 @@ export function preactDevtoolsPlugin({ // Ensure that we resolve before everything else enforce: "pre", + config() { + return { + optimizeDeps: { + include: ["preact/debug", "preact/devtools"], + }, + }; + }, + configResolved(resolvedConfig) { config = resolvedConfig; }, diff --git a/src/index.ts b/src/index.ts index ee773cf..6dd8714 100644 --- a/src/index.ts +++ b/src/index.ts @@ -82,7 +82,7 @@ export default function preactPlugin({ config() { return { optimizeDeps: { - include: ["preact/jsx-runtime"], + include: ["preact/jsx-runtime", "preact/jsx-dev-runtime"], }, }; },