Skip to content

Commit

Permalink
🔥 Remove deprecated code
Browse files Browse the repository at this point in the history
  • Loading branch information
amoutonbrady committed Jan 3, 2022
1 parent 5df5464 commit 58f0623
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,9 @@ export default function solidPlugin(options: Partial<Options> = {}): 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 {
/**
Expand Down Expand Up @@ -289,9 +285,7 @@ export default function solidPlugin(options: Partial<Options> = {}): 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);
Expand Down

0 comments on commit 58f0623

Please sign in to comment.