mirror of
https://github.com/denoland/deno.git
synced 2024-11-28 16:20:57 -05:00
Fix JSON Modules (#1514)
This commit is contained in:
parent
de9c67a702
commit
7d08db2191
3 changed files with 4 additions and 3 deletions
|
@ -137,6 +137,7 @@ export class Compiler
|
||||||
private readonly _options: ts.CompilerOptions = {
|
private readonly _options: ts.CompilerOptions = {
|
||||||
allowJs: true,
|
allowJs: true,
|
||||||
checkJs: true,
|
checkJs: true,
|
||||||
|
esModuleInterop: true,
|
||||||
module: ts.ModuleKind.ESNext,
|
module: ts.ModuleKind.ESNext,
|
||||||
outDir: "$deno$",
|
outDir: "$deno$",
|
||||||
resolveJsonModule: true,
|
resolveJsonModule: true,
|
||||||
|
|
|
@ -506,6 +506,7 @@ test(function compilerGetCompilationSettings() {
|
||||||
const expectedKeys = [
|
const expectedKeys = [
|
||||||
"allowJs",
|
"allowJs",
|
||||||
"checkJs",
|
"checkJs",
|
||||||
|
"esModuleInterop",
|
||||||
"module",
|
"module",
|
||||||
"outDir",
|
"outDir",
|
||||||
"resolveJsonModule",
|
"resolveJsonModule",
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
import * as config from "./subdir/config.json";
|
import config from "./subdir/config.json";
|
||||||
// TODO Shouldn't need 'default'
|
console.log(JSON.stringify(config));
|
||||||
console.log(JSON.stringify(config["default"]));
|
|
||||||
|
|
Loading…
Reference in a new issue