ckeditor可以正常工作,只是ngOnDestroy处理程序崩溃了。
"dependencies": {
"@angular/common": "8.0.0","@angular/compiler": "8.0.0","@angular/core": "8.0.0","@angular/forms": "8.0.0","@angular/platform-browser": "8.0.0","@angular/platform-browser-dynamic": "8.0.0","@angular/router": "8.0.0","@ckeditor/ckeditor5-angular": "1.1.0","@ckeditor/ckeditor5-basic-styles": "11.1.4","@ckeditor/ckeditor5-build-classic": "12.4.0",....
"zone.js": "0.10.0"
},
我正在使用Webpack通过插件“ TerserPlugin”将其最小化。 问题似乎来自
terserOptions: {
ecma: 6,ie8: false,toplevel: true,module: true,compress: {
dead_code: true,warnings: false,properties: true,drop_debugger: true,conditionals: true,booleans: true,loops: true,unused: true,if_return: true,inline: true,join_vars: true,ecma: 6,toplevel: true
},output: {
comments: false,beautify: false,indent_level: 2,ecma: 6
},mangle: {
module: true,toplevel: true
}
}
要尝试,我以这种方式更改了polyfills.ts文件中的zone.js:
import 'core-js/proposals/reflect-metadata';
import 'zone.js/dist/zone.js';
(window as any).__Zone_disable_toString = true;
require('../manifest.webapp');
但不能为我工作。
这是错误:
ERROR TypeError: Cannot read property 'data-ck-expando' of undefined
at Si (4.83409f22a2c74d96c1fe.chunk.js:1)
at Oa._getProxyEmitter (4.83409f22a2c74d96c1fe.chunk.js:1)
at Oa.stopListening (4.83409f22a2c74d96c1fe.chunk.js:1)
at Oa.destroy (4.83409f22a2c74d96c1fe.chunk.js:1)
at Oa.destroy (4.83409f22a2c74d96c1fe.chunk.js:1)
at ea.destroy (4.83409f22a2c74d96c1fe.chunk.js:1)
at Ip.destroy (4.83409f22a2c74d96c1fe.chunk.js:1)
at e.ngOnDestroy (main.83409f22a2c74d96c1fe.bundle.js:1)
at ug (main.83409f22a2c74d96c1fe.bundle.js:1)
at lg (main.83409f22a2c74d96c1fe.bundle.js:1)