Permalink
Browse files

sandbox, bugfix: [internal/typescript]set 'compilerOptions.module' as…

… 'CommonJS', to make test/ts_test.ts valid. (#426)
  • Loading branch information...
richardo2016 authored and xicilion committed Jun 5, 2018
1 parent f1bb380 commit 0f37b624af73e21f54901408c5636613847131f8
Showing with 4 additions and 0 deletions.
  1. +2 −0 fibjs/src/sandbox/loaders/ts_loader.cpp
  2. +2 −0 test/main.js
@@ -50,9 +50,11 @@ result_t TsLoader::run(SandBox::Context* ctx, Buffer_base* src, exlib::string na
v8::Local<v8::Object> compilerOptions = v8::Object::New(isolate->m_isolate);
compilerOptions->Set(isolate->NewString("target"), isolate->NewString("ES6"));
compilerOptions->Set(isolate->NewString("module"), isolate->NewString("CommonJS"));
compilerOptions->Set(isolate->NewString("strict"), v8::BooleanObject::New(isolate->m_isolate, true));
compilerOptions->Set(isolate->NewString("diagnostics"), v8::BooleanObject::New(isolate->m_isolate, true));
compilerOptions->Set(isolate->NewString("allowJs"), v8::BooleanObject::New(isolate->m_isolate, true));
// compilerOptions->Set(isolate->NewString("inlineSourceMap"), v8::BooleanObject::New(isolate->m_isolate, true));
// compilerOptions->Set(isolate->NewString("inlineSources"), v8::BooleanObject::New(isolate->m_isolate, true));
// compilerOptions->Set(isolate->NewString("sourceMap"), v8::BooleanObject::New(isolate->m_isolate, true));
View
@@ -54,6 +54,8 @@ run("./ws_test.js");
run("./vm_test.js");
run("./db_test.js");
run("./wasm_test.js");
run("./ts_test.js");
run("./ts_test.ts");
if (global.full_test) {
run("./mongo_test.js");

0 comments on commit 0f37b62

Please sign in to comment.