-
Notifications
You must be signed in to change notification settings - Fork 799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
warning with webpack5 #1249
Comments
Thanks for the report - could you please post more specific replication steps? |
@gavinr is right. a dummy application with the bare minimum code needed to reproduce the error would help the maintainers here focus on solving the problem instead of repro-ing the behavior you're reporting. based on the information @wwwwlm-work already provided, its possible webpack@5 is finding fault with the current mix of named and default exports. Line 248 in 3473979
The rollup doc confirms that the practice is frowned upon: https://rollupjs.org/guide/en/#default-export
i haven't given it much thought, but i'd expect the appropriate action to be getting rid of the |
here is the demo repo to reproduce : https://github.com/wwwwlm-work/issue-demo blow is what I did to prevent that warning temporarily: // current
export {version as VERSION} from '../package.json';
// improved
import pkg from '../package.json'
const VERSION = pkg.version;
export { VERSION }; |
Any update on this issue? |
Hello There is any solution on this?
when compiling webpack 5 get this erros, and this package is a dependency of other packages, forking it's not a solution.´ Thanks |
PRs welcome, I would suggest along the lines of @jgravois's suggestion:
|
the fix from @destus90 was released in v3.0.2 |
Describe the bug
not ok when using webpack5.
Expected behavior
should use default export instead of named export
Actual behavior
there comes a warning as blow:
in /node_modules/esri-leaflet/src/EsriLeaflet.js
Should not import the named export 'version' (reexported as 'VERSION') from default-exporting module (only default export is available soon)
To Reproduce
using webpack5
Environment Information
L.version
): 1.7.1L.esri.VERSION
): 2.5.2Additional context
webpack: 5.11.0;
The text was updated successfully, but these errors were encountered: