question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

Example: 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:open
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Gaurav0commented, 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.

0reactions
ef4commented, 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found