1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -05:00

Fix JSON Modules (#1514)

This commit is contained in:
Kitson Kelly 2019-01-14 15:18:42 +10:00 committed by Ryan Dahl
parent de9c67a702
commit 7d08db2191
3 changed files with 4 additions and 3 deletions

View file

@ -137,6 +137,7 @@ export class Compiler
private readonly _options: ts.CompilerOptions = {
allowJs: true,
checkJs: true,
esModuleInterop: true,
module: ts.ModuleKind.ESNext,
outDir: "$deno$",
resolveJsonModule: true,

View file

@ -506,6 +506,7 @@ test(function compilerGetCompilationSettings() {
const expectedKeys = [
"allowJs",
"checkJs",
"esModuleInterop",
"module",
"outDir",
"resolveJsonModule",

View file

@ -1,3 +1,2 @@
import * as config from "./subdir/config.json";
// TODO Shouldn't need 'default'
console.log(JSON.stringify(config["default"]));
import config from "./subdir/config.json";
console.log(JSON.stringify(config));