Giter Site home page Giter Site logo

Comments (8)

andygup avatar andygup commented on June 11, 2024 1

Hi @StreetStrider the short answer is no, there aren't any guaranteed client-side workarounds for this issue. We don't have any plans to change the behavior in the AMD CDN build. For troubleshooting, one suggestion is to tell Chrome to stop at all errors.

The only definitive fix would be to upgrade/migrate to @arcgis/core ES modules at some point.

from esri-loader.

andygup avatar andygup commented on June 11, 2024 1

But it seemes that this is not the only place that creates script elements, there's another place inside modules that comes from arcgis itself.

Right, you could potentially monkey patch require.injectUrl but it comes with the same challenges and caveats: https://github.com/dojo/dojo/blob/master/dojo.js#L1746

from esri-loader.

odoe avatar odoe commented on June 11, 2024 1

The resources repo might be a better place.
https://github.com/Esri/jsapi-resources/

from esri-loader.

StreetStrider avatar StreetStrider commented on June 11, 2024

We don't have any plans to change the behavior in the AMD CDN build.

I see. This is considered to be a legacy build, if I'm right.

Actually I thought I would be able to workaround this by myself, by monkey patching loader here. But it seemes that this is not the only place that creates script elements, there's another place inside modules that comes from arcgis itself.
origin

My last resort is to try to use mutationobserver / setinterval to put crossorigin attribute to loaded scripts, but it might not work and seemes quite tricky for my goal.

one suggestion is to tell Chrome to stop at all errors

I can't, because this is no local development. We receive this via our error tracking from live client browsers. Actually we would like to have such errors on developer machines, and we try to unmask them to make them reproducible locally.

from esri-loader.

StreetStrider avatar StreetStrider commented on June 11, 2024

I've tried to use @arcgis/[email protected] and got this error:

WARNING in ../../node_modules/@arcgis/core/core/workers/workers.js 5:863-872
Critical dependency: the request of a dependency is an expression

As it seemes through the code, arcgis/core uses dynamic imports with variable. Is it possible to consume arcgis/core by webpack alone or do I need some special plugin to assist?

from esri-loader.

odoe avatar odoe commented on June 11, 2024

That webpack warning can be ignored, it has no impact on build tooling. You can turn them off in webpack here.
https://webpack.js.org/configuration/stats/
There is no special plugin needed for @arcgis/core, but this is outside the scope of this repo.

from esri-loader.

StreetStrider avatar StreetStrider commented on June 11, 2024

@odoe thank you for answer.

but this is outside the scope of this repo

Understood. I expected it to be so. Where is the better place to address arcgis/core related questions?

from esri-loader.

andygup avatar andygup commented on June 11, 2024

Closing as won't fix.

from esri-loader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.