Skip to content

Commit

Permalink
More WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
kitsonk committed Oct 22, 2018
1 parent b427304 commit ef0ea3c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion js/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,6 @@ export class DenoCompiler
if (mediaType === MediaType.Json) {
// tslint:disable-next-line:max-line-length
moduleMetaData.outputCode = `define([], function() { return JSON.parse(\`${sourceCode}\`); });\n//# sourceURL=${fileName}`;
console.log(moduleMetaData.outputCode);
} else {
// TypeScript is overly opinionated that only CommonJS modules kinds can
// support JSON imports. Allegedly this was fixed in
Expand Down
2 changes: 1 addition & 1 deletion tests/020_json_modules.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import * as config from "./subdir/config.json";

console.log(config);
console.log(JSON.stringify(config));
1 change: 1 addition & 0 deletions tests/020_json_modules.ts.out
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"foo":{"bar":true,"baz":["qat",1]}}

0 comments on commit ef0ea3c

Please sign in to comment.