From 58f0623506c588b1312793f281fe33e342eb6ec7 Mon Sep 17 00:00:00 2001 From: Alexandre Mouton-Brady Date: Mon, 3 Jan 2022 21:19:45 +0100 Subject: [PATCH] :fire: Remove deprecated code --- src/index.ts | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/index.ts b/src/index.ts index ecff288..c230075 100644 --- a/src/index.ts +++ b/src/index.ts @@ -251,13 +251,9 @@ export default function solidPlugin(options: Partial = {}): Plugin { userConfig.resolve.alias = [...legacyAlias, ...normalizeAliases(userConfig.resolve?.alias)]; // fix for bundling dev in production - const nestedDeps = replaceDev ? [ - 'solid-js', - 'solid-js/web', - 'solid-js/store', - 'solid-js/html', - 'solid-js/h', - ] : []; + const nestedDeps = replaceDev + ? ['solid-js', 'solid-js/web', 'solid-js/store', 'solid-js/html', 'solid-js/h'] + : []; return { /** @@ -289,9 +285,7 @@ export default function solidPlugin(options: Partial = {}): Plugin { }, async transform(source, id, transformOptions) { - // @ts-expect-error anticipate vite changing second parameter as options object - // see https://github.com/vitejs/vite/discussions/5109 - const ssr: boolean = transformOptions === true || transformOptions?.ssr; + const ssr: boolean = transformOptions?.ssr; if (!/\.[jt]sx/.test(id)) return null; const inNodeModules = /node_modules/.test(id);