I'm trying to run a TypeScript file,the only code in the file is console.log("test")
i sourced it to a boiler plate HTML file,but when i try to execute in a live server with the VSC Live Server extention i get the error message:
Script from **file** was blocked because of a disallowed MIME type (“video/mp2t”)
I have searched everywhere and no solution works for me,help would be appreciated.
CodePudding user response:
fix this by add some code to karma.conf.js
mime: {
'text/x-typescript': ['ts','tsx']
}
CodePudding user response:
mime: {
'text/x-typescript': ['ts','tsx']
}
CodePudding user response:
Found the solution,turns out i just needed to use the tsc
command to compile to JavaScript