Skip to content

Commit

Permalink
fix: avoid require for devtools
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey committed Dec 14, 2023
1 parent 49c17b2 commit 1e5949e
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/__tests__/alias-virtual-modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { Module } from "module";
// For our browser remapped modules we skip resolution during testing and resolve the original source files.
const modules: Record<string, string> = {
"@internal/client": path.resolve("src/node_modules/@internal/client/node.ts"),
"@internal/client/devtools": path.resolve(
"src/node_modules/@internal/client/devtools.ts",
),
"@internal/gql-query": path.resolve(
"src/node_modules/@internal/gql-query/node.marko",
),
Expand Down
4 changes: 4 additions & 0 deletions src/__tests__/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export default async function (file: string) {
cwd,
"src/node_modules/@internal/client/browser.ts",
),
"@internal/client/devtools": path.join(
cwd,
"src/node_modules/@internal/client/devtools.ts",
),
"@internal/gql-query": path.join(
cwd,
"src/node_modules/@internal/gql-query/browser.marko",
Expand Down
5 changes: 3 additions & 2 deletions src/node_modules/@internal/client/browser.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/node_modules/@internal/client/devtools-prod.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/node_modules/@internal/client/devtools.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/node_modules/@internal/client/node.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/node_modules/@internal/client/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1e5949e

Please sign in to comment.