I followed the instructions to create a local copy of the arcgis js api 4.1. When I run my project I get a CORs error saying:
XMLHttpRequest cannot load http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer?f=json. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4000' is therefore not allowed access. The response had HTTP status code 501.
This error is odd b/c the API should not make preflighted (options) request to this url, it should make a get request (originally thats what it does). I have tried all the esri/config options to disable the cors but nothing seems to work. It doesn't load the map tiles. Anyone know how I can fix this?
Below is the config file for my project: