Hello everyone, in legacy plugins I was able to run the following import:
import EditorJs from 'react-editor-js';
In the new platform (v7.8.2) I can no longer do that import.
This generates the following errors (when using node scripts/build_kibana_platform_plugins
), is there a workaround? my plugin is not used by other plugins.
$ node scripts/build_kibana_platform_plugins
info initialized, 99 bundles cached
info starting worker [1 bundles, ? modules]
ERROR webpack compile errors
βERROR [myPlugin] build
βERROR Optimizations failure.
β 186 modules
β
β ERROR in ./node_modules/@editorjs/editorjs/dist/editor.js
β Module parse failed: disallowed syntax found in file /home/tosti/Tosti_/kibana_7.8.2/kibana/plugins/myPlugin/node_modules/@editorjs/editorjs/dist/editor.js:
β - [es2015] ...spread
β - [es2015] let/const variable declaration
β - [es2015] arrow function expression
β - [es2015] class
β - [es2015] destructuring
β You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
β Error: disallowed syntax found in file /home/tosti/Tosti_/kibana_7.8.2/kibana/plugins/myPlugin/node_modules/@editorjs/editorjs/dist/editor.js:
β - [es2015] ...spread
β - [es2015] let/const variable declaration
β - [es2015] arrow function expression
β - [es2015] class
β - [es2015] destructuring
β at parser.hooks.program.tap.program (/home/tosti/Tosti_/kibana_7.8.2/kibana/packages/kbn-optimizer/src/common/disallowed_syntax_plugin/disallowed_syntax_plugin.ts:64:17)
β at SyncBailHook.eval (eval at create (/home/tosti/Tosti_/kibana_7.8.2/kibana/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:16)
β at Parser.parse (/home/tosti/Tosti_/kibana_7.8.2/kibana/node_modules/webpack/lib/Parser.js:2280:26)
β at doBuild.err (/home/tosti/Tosti_/kibana_7.8.2/kibana/node_modules/webpack/lib/NormalModule.js:482:32)
β at runLoaders (/home/tosti/Tosti_/kibana_7.8.2/kibana/node_modules/webpack/lib/NormalModule.js:358:12)
β at /home/tosti/Tosti_/kibana_7.8.2/kibana/node_modules/loader-runner/lib/LoaderRunner.js:373:3
β at iterateNormalLoaders (/home/tosti/Tosti_/kibana_7.8.2/kibana/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
β at Array.<anonymous> (/home/tosti/Tosti_/kibana_7.8.2/kibana/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
β at Storage.finished (/home/tosti/Tosti_/kibana_7.8.2/kibana/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:43:16)
β at provider (/home/tosti/Tosti_/kibana_7.8.2/kibana/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:79:9)
β at /home/tosti/Tosti_/kibana_7.8.2/kibana/node_modules/graceful-fs/graceful-fs.js:115:16
β at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
β @ ./node_modules/react-editor-js/dist/react-editor-js.umd.js 2:110-139
β @ ./public/components/editor/main.js
β @ ./public/components/editor/index.js
β @ ./public/containers/editor.js
β @ ./public/containers/index.js
β @ ./public/components/app.tsx
β @ ./public/application.tsx
β @ ./public/plugin.ts
β @ ./public/index.ts