1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-23 15:49:44 -05:00

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