使用webpack的Ckeditor不起作用

时间:2016-10-27 18:56:15

标签: npm ckeditor webpack

有没有办法让它与webpack一起工作?

安装为:

npm install ckeditor --save-dev

包括

window.CKEDITOR_BASEPATH = '../../node_modules/ckeditor/ckeditor';
require('ckeditor')

获得

ckeditor:1 Uncaught SyntaxError: Unexpected token <

1 个答案:

答案 0 :(得分:-1)

在index.html

中添加此内容
  <script>
      var CKEDITOR_BASEPATH = '/ckeditor/';
  </script>