【发布时间】:2021-09-02 01:28:35
【问题描述】:
我已经使用 react-leaflet 有一段时间了,几周后我删除了 node_modules 中的文件并重新安装了它们,我根本没有接触 react-leaflet 版本,但是当我尝试运行时该项目,它给了我一个错误。
./node_modules/@react-leaflet/core/esm/path.js 10:41 模块解析失败:意外令牌 (10:41) 使用这些加载器处理了文件:
- ./node_modules/react-scripts/node_modules/babel-loader/lib/index.js 您可能需要一个额外的加载器来处理这些加载器的结果。 |使用效果(函数更新路径选项(){ | if (props.pathOptions !== optionsRef.current) {
const options = props.pathOptions ?? {};
| element.instance.setStyle(options); | optionsRef.current = 选项;
【问题讨论】:
标签: reactjs leaflet react-leaflet babel-loader react-leaflet-v3