question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

why localization Arcgis API for js in @arcgis/webpack-plugin not working

See original GitHub issue

my environment “@arcgis/webpack-plugin”: “^4.11.0”, “webpack”: “^4.33.0”, i use @arcgis/webpack-plugin for asrcgis api for js work with webpack,At first all was well,but when i want to set localization like this

`

<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script> var dojoConfig = { locale: 'zh-cn', parseOnLoad: true } </script> <title> Webpack App </title> <link href="style/index.02752355b6237e15ecc5.css" rel="stylesheet"></head> <body> <div id="root"></div> <script type="text/javascript" src="static/js/index.3a6d182a5f7f766e2f35.js"></script></body> </html> ` but it is not working ,i refer to this https://developers.arcgis.com/javascript/latest/guide/localization/ and i use like this in many place include Arcgis api for js v4.11 with esri-loader

this is my code in gitHub https://github.com/dxiuxiu/arcgis-webpack-ArcGISPlugin.git

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
odoecommented, Jul 15, 2020

Please see this issue. Localization is now handled differently in the ArcGIS API for JavaScript and is not defined by the plugin anymore. Our localization is all dynamic and no strings are baked into built code. Although if you are using some Dojo bits in your app, it should still apply there.

I am currently considering if a locale defined in the plugin would filter the the copied localization files, but nothing is yet implemented.

Thanks

1reaction
odoecommented, Jul 6, 2020

I need to test this further, as our localization has changed for 4.16. Might require an updated configuration.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using arcgis-webpack-plugin when site runs under a...
I am trying to use the the webpack plugin ( GitHub - Esri/arcgis-webpack-plugin: Webpack plugin for the ArcGIS API for JavaScript ) with...
Read more >
Build with ES modules | ArcGIS Maps SDK for JavaScript 4.25
The ArcGIS Maps SDK for JavaScript 's ES modules are available for local installation ... and avoid any unexpected issues or errors with...
Read more >
Using webpack for Custom Builds | ArcGIS API for JavaScript 4.9
webpack is a module bundler for JavaScript. It can basically process the code in your application and bundle it up, not only into...
Read more >
ArcGIS API for JavaScript: Using React and Webpack - YouTube
Learn to build powerful applications that integrate the ArcGIS API for JavaScript via the ArcGIS webpack plugin or Esri -loader.
Read more >
The ArcGIS API failed to load - Stack Overflow
Sorry for not directly responding to your described error, but I would not use esri-loader with newer versions of ArcGIS for JavaScript API....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found