We are experiencing CORS error when application is deployed. No errors while accessing through localhost:
Access to fetch at 'https://js.arcgis.com/4.27/@arcgis/core/assets/esri/widgets/Zoom/t9n/Zoom_en.json' from origin '<our application>' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
After doing some research it seems we have to use
import Config from "@arcgis/core/config"; module and add
but when I do that I get these errors:
Logger.js:5 [esri.widgets.Attribution] widget-intl:locale-error esri.widgets.Attribution
- s {name: 'intl:message-bundle-error', details: {…}, message: 'Errors occurred while loading "esri/widgets/Attribution/t9n/Attribution"'}
- details: {errors: Array(1)}
- message: "Errors occurred while loading \"esri/widgets/Attribution/t9n/Attribution\""
- name: "intl:message-bundle-error"
- [[Prototype]]: e
Has anyone experience any issues like this. Would really appreciate any help in this
Thanks
-Luv