问题描述
vue 项目打包的时候,本地正常,线上报错找不到模块
Module not found: Error: Can't resolve './layerTmpShape' in '...'
经排查模块的路径是对的,.vue 模块文件名称是 ‘LayerTmpShape’,但是文件里的 name 是 ‘layerTmpShape’。
找不到自定义模块一般都是路径不对或者名字错误。
解决办法
改成 import LayerTmpShape from './LayerTmpShape'
非常低级的错误……
以后起名字要规范点,大小写统一。
所有评论(0)