-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Open
Open
Copy link
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectplatform-webWeb applications specificallyWeb applications specificallyteam-webOwned by Web platform teamOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform teamTriaged by Web platform teamwould be a good packageSeparate Flutter package should be made for thisSeparate Flutter package should be made for this
Description
Problem
Flutter Web currently generates several JS files to integrate with the browser, like flutter.js and flutter_service_worker.js.
While doing changes to those files, it's some times hard to remember what bits of ECMAScript are supported by which versions of each browser, and bugs like this happen:
- [tool][web] Fix flutter.js in Safari 13 #104761
- use old Edge-compatible JavaScript in index.html #83732
(And possibly others)
Proposal
Integrate in our build process something like esbuild that would let us:
- Write the JavaScript in whatever version we want, with the latest features
- Ensure that said javascript will run in our supported browsers (with
--target=es6, for example), regardless of what features we use - (optional) Minify the code.
PS: the esbuild pass could also happen as post-processing after a flutter build web, this doesn't need to be necessarily integrated with the flutter tool, so adding the "this may be a good package" label also.
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectplatform-webWeb applications specificallyWeb applications specificallyteam-webOwned by Web platform teamOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform teamTriaged by Web platform teamwould be a good packageSeparate Flutter package should be made for thisSeparate Flutter package should be made for this