-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can this work with typescript? #188
Comments
I can fix this by add some code to karma.conf.js:
is there something better? |
More info on this issue:
|
@MikaAK - Something that we should address in #master at the very least. Back porting it later is another issue. |
Interesting I was unaware of this previously. I'll make sure to get this fixed in v2 |
It's new(ish) as of Chrome 55 unless you run Canary. |
Just caught this on an older project I loaded up, and it suddenly wasn't working... Of course Chrome had changed in the meantime. Updated to newest version of Karma, etc., and still not working till I added the @MikaAK Is there a commit or merge request to track for this getting released? |
My karma-webpack is currently v2.0.2. The karma-webpack still does not transpile the file in .ts to .js, and current workaround is mime: {'text/x-typescript': ['ts','tsx']}. Also, i read on internet that WebPack, by default, doesn't pass source maps up to Karma unless the file extension is .js. the workaround is to explicitly configure the webpack property in Karma config file to be as shown below })] If karma-webpack can transpile ts to js, the above workaround will not be needed. |
Is it posible to have the option like Changing |
@hanct plugins: [
new webpack.SourceMapDevToolPlugin({
filename: null,
test: /\.(ts|tsx|js)($|\?)/i
})
], It did change the stack traces but it still doesn't seem quite right. |
mime: {
'text/x-typescript': ['ts','tsx']
}, Works, OP deserves a coffee from all of us, or a virtual hifi, whatever is easiest. |
See also #334. |
I have moved to jest for a few years |
Jest can do everything that you need with Karma??? |
@quantuminformation Jest don't need Karma. |
I use it like this:
That can't work, because the output file is index.ts,
browser doesn't recognize .ts file.
when I change all .ts to .js,and index.ts to index.js,
it work well. How can I solve this?
thanks.
The text was updated successfully, but these errors were encountered: