nhn / tui.editor

🍞📝 Markdown WYSIWYG Editor. GFM Standard + Chart & UML Extensible.
http://ui.toast.com/tui-editor
MIT License
17.17k stars 1.75k forks source link

Feature request - Please add support for ES2015 #1078

Open mehmetgunacti opened 4 years ago

mehmetgunacti commented 4 years ago

It seems that current version of tui.editor is available as CommonJS module only.

Google suggests avoiding the use of CommonJS modules since it impacts the tree-shaking of application. Ref: https://web.dev/commonjs-larger-bundles/

I would therefore request you to please release this package as a ES2015 module as well.

Thank you

Angular project warnings :

WARNING in /.../src/modules/notes/components/note-display/note-display.component.ts depends on '@toast-ui/editor'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

WARNING in /.../src/modules/notes/containers/note-edit/note-edit.component.ts depends on '@toast-ui/editor-plugin-color-syntax'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
seonim-ryu commented 4 years ago

@msegmx Thanks for suggesting a good feature. I think it would be nice to provide it as a ES2015 module. Let's review it. I'll check if it's available.

sampullman commented 3 years ago

I wasn't able to get the editor to work in a Vue3/Vite app, so I migrated the libs and app/editor to build with rollup and packaged a module here: https://www.npmjs.com/package/@pledgecamp/toast-ui-editor

It doesn't have a browser build and is probably not suitable for production use, but maybe it's helpful to somebody.