Open steve-taylor opened 3 years ago
Just tried it out with the snippets you've provided and it works as expected on my end. All options are passed correctly to esbuild
and it injects the file correctly. If an option cannot be resolved we forward all errors thrown by esbuild by default.
Please ensure that you're on a recent version of esbuild
and karma-esbuild
. If the error still occurs the command output might give further hints as to why those files cannot be found. Esbuild prints a big red error message at the beginning before karma logs to the console.
I don't suppose you have a working example of karma-esbuild
with React, by any chance?
Hey @steve-taylor , I'm facing the same issue, any updates/solutions? Thanks.
@RamiAlzayat yes. My solution was to use Cypress component test runner instead.
Here's my config:
import React from 'react';
is not being injected at all. Also, changingtsconfig
to anything else has no effect.The documentation says that this is how you pass options to esbuild, but it appears not to be the case.