Comments (3)
Hi, this is a known issue. Bundler wraps all modules in an async iife function to allow top level await code in browsers that do not support it yet. This doesn't work if there are circular dependencies, therefore an error is thrown for precaution.
Circular dependencies are handled by esm, so this problem will be solved once all major browsers have tla support and the wrapping is no longer needed. As of today we are waiting for safari to catch up: https://caniuse.com/?search=top%20level%20await
from bundler.
Hi. Thanks for the info. Does that mean the chunking logic will just be updated to ensure that circular references are always spread across different chunks? (Since if you use top-level-await and have a single file you could just wrap the whole thing in an async iife right?)
from bundler.
Circular dependencies should be fixed now.
from bundler.
Related Issues (20)
- how to disable export default in final js bundle file? HOT 2
- Use as a api HOT 2
- API: bundle function don't write output assets HOT 2
- API doc
- hello_world examples not working HOT 1
- Generic lambda compiled as React components HOT 1
- export default is working only with function HOT 1
- bundler and bundler api are not emiting javascript output HOT 3
- examples/server don't work HOT 2
- spa dev server example HOT 1
- project struture in read me HOT 1
- API Examples failing
- Bundler fails to run when trying to import `acorn` via `terser` HOT 5
- Crash with CSS Gradients: `TypeError: i.walkFunctionNodes is not a function` HOT 3
- Does not understand .mjs extension / script type HOT 1
- Fails to download one of the dependency files HOT 3
- Bundler misinterprets Windows path as a url HOT 4
- Newline behavior HOT 4
- Guide for create pluging HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bundler.