Skip to content
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

fix: Use default export from package instead of named export version #1273

Merged
merged 3 commits into from
May 24, 2021

Conversation

destus90
Copy link
Contributor

https://webpack.js.org/migrate/5/#cleanup-the-code

Using named exports from JSON modules: this is not supported by the new specification and you will get a warning. Instead of import { version } from './package.json' use import package from './package.json'; const { version } = package;

With this fix allow to use Webpack 5 with no warning emitted.

Fixes #1249

@gavinr gavinr requested review from gavinr and jwasilgeo May 24, 2021 13:44
Copy link
Contributor

@gavinr gavinr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me - thanks for the PR!

@gavinr gavinr merged commit a6a46fc into Esri:master May 24, 2021
@destus90 destus90 deleted the webpack5-warning branch May 24, 2021 17:15
@gavinr
Copy link
Contributor

gavinr commented May 24, 2021

released in v3.0.2

gavinr pushed a commit to gavinr/esri-leaflet-heatmap that referenced this pull request Mar 8, 2022
New way to import the JSON file, same change as Esri/esri-leaflet#1273
jgravois pushed a commit to jgravois/esri-leaflet that referenced this pull request Apr 23, 2022
…sri#1273)

* fix: Use default export from package instead of named export version

* formatting

* changelog

Co-authored-by: Gavin Rehkemper <grehkemper@esri.com>
jgravois pushed a commit to jgravois/esri-leaflet that referenced this pull request Apr 23, 2022
…sri#1273)

* fix: Use default export from package instead of named export version

* formatting

* changelog

Co-authored-by: Gavin Rehkemper <grehkemper@esri.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

warning with webpack5
4 participants