-
Notifications
You must be signed in to change notification settings - Fork 220
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
Transpiled file is in .ts, instead of .js. #260
Comments
@DanielRosenwasser is there any perscribed best practices for this? |
FWIW - my webpack config hands off to |
Hi rhys-e, mime: { 'text/x-typescript': ['ts','tsx'] }, For my case, i need to. |
No I don't. I just tell webpack to use ts-loader to load any files with a .ts extension as a webpack rule. |
Hi rhys-e,, Refused to execute script from 'http://localhost:9880/base/main/id_generator/client/unit_test/bidderValidation.test.ts' because its MIME type ('video/mp2t') is not executable. Searching on internet shows that I am not alone. I not sure if u have encountered this. |
I don't have that issue - I imagine it has something to do with default apps used for opening certain extensions (or the lack thereof). |
Hello, I have the same issue as @rhys-e . Using mime
|
@reda-alaoui @hanct I too have just been fighting the Karma config for the last couple of hours. I'm running webpack 3.10 and karma-webpack 2.09. Even on a DEBUG log output karma-webpack isn't much help when it is a config issue. I had the same situation where webpack did not seem to be transpiling the typescript to javascript. If I checked the file in the browser I could confirm that it was unmodified typescript. Tripple check your karma config. For me it was a path issue. Next start simple. Create a simple test case (something like true.isTruthy()) in its own file in the same folder as the karma.config. Specify that exact file name in the karma Make sure you webpack module rule is something simple like |
See also #334 |
I've fixed this in #347! |
Released in |
Released in |
My karma-webpack is currently v2.0.4. I observe that the karma-webpack does not transpile the file in .ts to .js. In other word, the transpiled file seem to be still in .ts. May I know if karma-webpack has any configuration that allows me to configure the transpiled file's extension? I need it to be in .js, which actually make sense since the content of the transpiled file is suppose to be in javascript.
The text was updated successfully, but these errors were encountered: