Skip to content

Commit

Permalink
Merge pull request #152 from atk/external-solid-for-testing-with-npm
Browse files Browse the repository at this point in the history
import solid as external to fix testing with npm
  • Loading branch information
ryansolid authored Mar 15, 2024
2 parents 7500d78 + e52d554 commit 758f2af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/fast-rocks-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"vite-plugin-solid": patch
---

import solid as external to fix testing with npm
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ export default function solidPlugin(options: Partial<Options> = {}): Plugin {

test.server = test.server || {};
test.server.deps = test.server.deps || {};
if (!test.server.deps.inline?.find((item: string | RegExp) => /solid-js/.test(item.toString()))) {
test.server.deps.inline = [...(test.server.deps.inline || []), /solid-js/];
if (!test.server.deps.external?.find((item: string | RegExp) => /solid-js/.test(item.toString()))) {
test.server.deps.external = [...(test.server.deps.external || []), /solid-js/];
}

const jestDomImport = getJestDomExport(userSetupFiles);
Expand Down

0 comments on commit 758f2af

Please sign in to comment.