Closed jridgewell closed 3 years ago
This should wait for #12 before we merge, so I can ensure the test suite passes on all OSs.
I had to include #13 in this PR to get the tests to consistently pass. You can see a diff by going to https://github.com/jridgewell/karma-esbuild/compare/karma-jsdom-launcher...single-bundle.
For larger projects, having each test file compile its own copy of the entire codebase leads to gigantic builds (AMP reached 20+ GB before my computer killed the process). This is because we treated each file as its own distinct
entryPoint
.Instead, this creates a single bundle file that imports each test file, and has esbuild build that file. This leads to a single copy of the code base, and considerably smaller builds.