Fix behavior for extensionless files with .mime file (#1779)

This commit is contained in:
Kevin (Kun) "Kassimo" Qian 2019-02-15 08:05:29 -08:00 committed by Ryan Dahl
parent 2241049c34
commit fe0ceae543
10 changed files with 14 additions and 2 deletions

1
.gitignore vendored
View File

@ -9,6 +9,7 @@ yarn.lock
node_modules
# editor files
.idea
.vscode
# export dir for gh-pages
/gh-pages
# temp benchmark data

View File

@ -162,6 +162,7 @@ class Compiler implements ts.LanguageServiceHost, ts.FormatDiagnosticsHost {
// arguments
private readonly _options: ts.CompilerOptions = {
allowJs: true,
allowNonTsExtensions: true,
checkJs: true,
esModuleInterop: true,
module: ts.ModuleKind.ESNext,

View File

@ -266,11 +266,12 @@ export default function makeConfig(commandOptions) {
"createLanguageService",
"formatDiagnostics",
"formatDiagnosticsWithColorAndContext",
"version",
"Extension",
"ModuleKind",
"ScriptKind",
"ScriptSnapshot",
"ScriptTarget",
"version"
"ScriptTarget"
]
}
}),

View File

@ -0,0 +1 @@
console.log("HELLO");

View File

@ -0,0 +1 @@
application/javascript

View File

@ -0,0 +1 @@
HELLO

View File

@ -0,0 +1,2 @@
args: tests/023_no_ext_with_mime --reload --recompile
output: tests/023_no_ext_with_mime.out

View File

@ -0,0 +1,2 @@
args: tests/024_import_no_ext_with_mime.ts --reload --recompile
output: tests/024_import_no_ext_with_mime.ts.out

View File

@ -0,0 +1 @@
import "./023_no_ext_with_mime";

View File

@ -0,0 +1 @@
HELLO