目前我正在使用來自角度cli的webpack配置,並面臨着.map解析器的相同問題。任何解決地圖或附加加載器問題的解決方法? ES5的代碼工作正常,它與ES6系統的問題模塊解析失敗 - Webpack Angular/cli和xtermjs
WARNING in ./node_modules/xterm/lib/addons/search/search.js.map
Module parse failed: /home/jack/Projects/C290/website/node_modules/source-map-loader/index.js
無法入侵到webconfig。刪除文件.MAP沒有幫助
更新:
import { Terminal } from 'xterm';
@Component({...})
export class AppComponent{
xterm;
constructor(){
// Following line or not - it breaks with search.js.map
//Terminal.loadAddon('search');
// The following code when run breaks with the error
this.xterm = new Terminal();
}
}
這是實際的問題,但在哪裏CLI的WebPack配置修改申請? https://github.com/sourcelair/xterm.js/issues/1018
https://github.com/sourcelair/xterm.js/issues/877
你有一個簡約的例子,你可以分享? – pixelbits
它是一個大的應用程序。可能無法把所有的代碼。但我更新了實際的破解代碼。 – Gary
您正在使用ts loader嗎? – pixelbits