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

In addon consuming dynamic imports via ember-auto-import chunk not found #723

Open
gabrielgrant opened this issue Jun 11, 2020 · 7 comments

Comments

@gabrielgrant
Copy link

Example: https://ember-twiddle.com/c9f21301be20398fdd75f7d4a38f73d1?openFiles=templates.application%5C.hbs%2C

Error: error rendering mapbox-gl Error: "Loading chunk 0 failed. (error: https://addons.ember-twiddle.com/ember-3.18.0/ember-mapbox-gl/1.0.1/chunk.cf2b9ca2730293fd972d.js)" onScriptComplete Ember

The request inspector shows a 403 response from a request to https://addons.ember-twiddle.com/ember-3.18.0/ember-mapbox-gl/1.0.1/chunk.cf2b9ca2730293fd972d.js :

<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>EF10342DBE364C13</RequestId><HostId>51fFbO8IBpAh4H2yzPPBCVWjHLhqYNUU8pVyJvD8M6icJg7QxGb1G7XmpMq5T6SO+VfoLuAl+Ag=</HostId></Error>
@Gaurav0
Copy link
Contributor

Gaurav0 commented Jun 11, 2020

Changing title to indicate underlying issue.

@Gaurav0 Gaurav0 changed the title Addon fails to load with 403 response from addons.ember-twiddle.com In addon consuming dynamic imports via ember-auto-import chunk not found Jun 11, 2020
@Gaurav0
Copy link
Contributor

Gaurav0 commented Jun 11, 2020

@ef4 Here is another issue with ember-auto-import and ember-twiddle.

@gabrielgrant
Copy link
Author

Thanks for taking a look/tracking down the root cause. Is there any way to work around this at the moment?

@Gaurav0
Copy link
Contributor

Gaurav0 commented Jun 11, 2020

@gabrielgrant Even if you could work around this issue, ember twiddle uses a sandboxed iframe for security reasons. From a sandboxed iframe, you may not access an external api, or use web workers. But thanks for bringing this issue to my attention.

@ef4
Copy link

ef4 commented Jun 12, 2020 via email

@Gaurav0
Copy link
Contributor

Gaurav0 commented Jun 15, 2020

@ef4 is there some way we can force ember-auto-import to do a completely static build and include everything in the vendor tree?

@ef4
Copy link

ef4 commented Jun 17, 2020

auto-import allows you to pass options through to webpack, so you may be able to use something like LimitChunkCountPlugin with a limit of 1 to force everything into one chunk file.

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

No branches or pull requests

3 participants