babel-plugin-component
babel-plugin-component copied to clipboard
同一个项目中,既包含了全量引入,又包含了按需引入,然后有如下报错,请教下如何解决?
error in ./src_form/main.js
Syntax Error: Error: D:\Project\jc_forms_git\src_form\main.js: [babel-plugin-component] If you are using bothon-demand and importing all, make sure to invoke the importing all first.
at Array.map (
@ multi (webpack)-dev-server/client?http://192.168.1.208:8080/sockjs-node (webpack)/hot/dev-server.js ./src_form/main.js
error in ./src_report/main.js
Syntax Error: Error: D:\Project\jc_forms_git\src_report\main.js: [babel-plugin-component] If you are using bothon-demand and importing all, make sure to invoke the importing all first.
at Array.map (
@ multi (webpack)-dev-server/client?http://192.168.1.208:8080/sockjs-node (webpack)/hot/dev-server.js ./src_report/main.js
error in ./src_todo/main.js
Syntax Error: Error: D:\Project\jc_forms_git\src_todo\main.js: [babel-plugin-component] If you are using bothon-demand and importing all, make sure to invoke the importing all first.
at Array.map (
@ multi (webpack)-dev-server/client?http://192.168.1.208:8080/sockjs-node (webpack)/hot/dev-server.js ./src_todo/main.js
按照babel-plugin-component
给出的提示,如果既有全局又有按需引入的话,你应该先全局引入,再按需引入。