In addon consuming dynamic imports via ember-auto-import chunk not found
See original GitHub issueExample: https://ember-twiddle.com/c9f21301be20398fdd75f7d4a38f73d1?openFiles=templates.application\.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>
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Ember-auto-import dynamic import chunk in Chrome does not ...
We have a few apps that dynamically import some ember && non-ember libraries. In Chrome/Brave only (FF, Microsoft Edge Chromium based ...
Read more >ember-auto-import - npm
ember-auto-import will refuse to import devDependencies of your addon into addon code (because that would fail in a consuming application).
Read more >Dynamic Imports: Am I missing something? - Stack Overflow
Update for React 18: The code below is no longer required to split chunks/dynamically load components. Instead, you can use React.lazy with ...
Read more >Code splitting with webpack and TypeScript - Spencer Miskoviak
Dynamic imports were introduced in TypeScript 2.4. ... If you were not using esnext modules before this and relying on the same ...
Read more >Using Native JavaScript Modules in Production Today
In addition to code-splitting via dynamic imports, I suggest also ... for the modules added to the chunk, not all lodash modules):
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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.
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.