Skip to content

Commit 512a9cd

Browse files
authored
[tfjs-core] Ignore worker_node_test in webgpu karma's bundler (#1834)
INTERNAL `worker_node_test.ts` in tfjs-core contains a conditional require statement that confuses the bundler of karma-typescript. Ignoring that file at the bundler stage fixes the problem
1 parent 4ea20c2 commit 512a9cd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tfjs-webgpu/karma.conf.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ const karmaTypescriptConfig = {
1919
tsconfig: 'tsconfig.json',
2020
// Disable coverage reports and instrumentation by default for tests
2121
coverageOptions: {instrumentation: false},
22-
reports: {}
22+
reports: {},
23+
bundlerOptions: {
24+
// worker_node_test in tfjs-core contains a conditional require statement
25+
// that confuses the bundler of karma-typescript.
26+
ignore: ['./worker_node_test']
27+
}
2328
};
2429

2530
module.exports = function(config) {

0 commit comments

Comments
 (0)