使用Typescript開發Vue,一切准備就緒。但npm start 時,提示“
ERROR in ./src/main.ts
Module build failed: TypeError: Cannot read property 'afterCompile' of undefined“錯誤。
解決方法
將ts-loader從4.0降低到3.1.1解決問題。是由於webpack和ts-loader版本不兼容造成的。
使用Typescript開發Vue,一切准備就緒。但npm start 時,提示“
ERROR in ./src/main.ts
Module build failed: TypeError: Cannot read property 'afterCompile' of undefined“錯誤。
將ts-loader從4.0降低到3.1.1解決問題。是由於webpack和ts-loader版本不兼容造成的。
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。