From 655990c2a7a812233f9f6d6a10b06d4589bbbf85 Mon Sep 17 00:00:00 2001 From: jos Date: Wed, 12 Sep 2018 09:41:07 +0200 Subject: [PATCH] Fix #548: `import JSONEditor from 'jsoneditor'` not working in TypeScript projects --- HISTORY.md | 6 ++++++ src/js/JSONEditor.js | 3 +++ 2 files changed, 9 insertions(+) diff --git a/HISTORY.md b/HISTORY.md index 2428220f0..6689cda7c 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -3,6 +3,12 @@ https://github.com/josdejong/jsoneditor +## 2018-09-12, version 5.24.6 + +- Fix #548: `import JSONEditor from 'jsoneditor'` not working in + TypeScript projects (gave a constructor is undefined error). + + ## 2018-09-06, version 5.24.5 - Fixed a bug in textmode on IE 11, not loading the editor when diff --git a/src/js/JSONEditor.js b/src/js/JSONEditor.js index ededd81c4..e455d379f 100644 --- a/src/js/JSONEditor.js +++ b/src/js/JSONEditor.js @@ -456,4 +456,7 @@ JSONEditor.ace = ace; JSONEditor.Ajv = Ajv; JSONEditor.VanillaPicker = VanillaPicker; +// default export for TypeScript ES6 projects +JSONEditor.default = JSONEditor; + module.exports = JSONEditor;