Set*_*ske 5 javascript webpack esri-leaflet-geocoder
我在我的 React 项目中使用 webpack 5.44.0 和 webpack-dev-server 3.11.2 以及自定义 webpack/babel 配置。我正在将esri-leaflet-geocoder导入到我的项目中。使用 webpack 开发服务器进行开发时,我收到以下警告:
WARNING in ./node_modules/esri-leaflet-geocoder/node_modules/esri-leaflet/src/EsriLeaflet.js 2:0-51
Should not import the named export 'version' (reexported as 'VERSION') from default-exporting module (only default export is available soon)
@ ./node_modules/esri-leaflet-geocoder/dist/esri-leaflet-geocoder-debug.js 5:102-125
@ ./src/index.tsx 34:0-31
Run Code Online (Sandbox Code Playgroud)
我读到了问题Error: Should not import the named export 'version' (imported as 'version'),这似乎是最密切相关的。但就我而言,这个问题隐藏在 esri-leaflet-geocoder 的外部模块中,所以我真的无法控制其中的代码。
是否可以告诉 webpack 开发服务器忽略这种特定类型的警告,或源自 node_modules 文件夹内的任何警告?我想在我自己的代码中保留警告,但如果警告是由 node_module 中的代码引起的,则不打印警告。webpack 中是否可以对警告进行这种精细控制?我怎样才能忽略这个警告?
| 归档时间: |
|
| 查看次数: |
850 次 |
| 最近记录: |