From 36fbe6f13e7e3a370edae090ca2292fae45235a9 Mon Sep 17 00:00:00 2001 From: Kamil Rojewski Date: Thu, 2 Jul 2020 21:44:55 +0200 Subject: [PATCH] Updated FB import (#6019) Previous FB import was based on the original early TS implementation and did not take into accout NPM. There doesn't seem to be a use for current implemenentation anymore, while NPM compatibility is needed. Co-authored-by: Kamil Rojewski --- src/idl_gen_js_ts.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/idl_gen_js_ts.cpp b/src/idl_gen_js_ts.cpp index 6c6d619..7c3f14a 100644 --- a/src/idl_gen_js_ts.cpp +++ b/src/idl_gen_js_ts.cpp @@ -214,7 +214,7 @@ class JsTsGenerator : public BaseGenerator { ++it) { if (lang_.language == IDLOptions::kTs) { if (it->find('.') == std::string::npos) { - code += "import { flatbuffers } from \"./flatbuffers\"\n"; + code += "import * as flatbuffers from 'flatbuffers';\n"; break; } } else { -- 2.7.4