2018年6月9日

react 中使用import()实现按需加载报错 解决方法 --‘import’ and ‘export’ may only appear at the top level

摘要: 因为项目需要搞一下按需加载,使用import实现代码打包分片按需加载,但是在实际使用中报语法错误。报错信息如下 SyntaxError: ‘import’ and ‘export’ may only appear at the top level 啊咧?报错了。 查找发现很多人碰到过,解决方法不同, 阅读全文

posted @ 2018-06-09 18:21 浅水224 阅读(5971) 评论(0) 推荐(0) 编辑

导航