{"id":27045049,"url":"https://github.com/mefechoel/minimal-bundle","last_synced_at":"2025-04-05T05:32:23.478Z","repository":{"id":39486566,"uuid":"165383937","full_name":"mefechoel/minimal-bundle","owner":"mefechoel","description":"An example app with a webpack config for a minimal bundle size.","archived":false,"fork":false,"pushed_at":"2022-12-10T04:16:08.000Z","size":679,"stargazers_count":0,"open_issues_count":44,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2023-03-06T22:44:39.355Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mefechoel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-12T12:10:39.000Z","updated_at":"2019-08-08T10:52:02.000Z","dependencies_parsed_at":"2022-08-27T00:51:12.661Z","dependency_job_id":null,"html_url":"https://github.com/mefechoel/minimal-bundle","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mefechoel%2Fminimal-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mefechoel%2Fminimal-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mefechoel%2Fminimal-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mefechoel%2Fminimal-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mefechoel","download_url":"https://codeload.github.com/mefechoel/minimal-bundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247294224,"owners_count":20915332,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-05T05:31:33.044Z","updated_at":"2025-04-05T05:32:23.463Z","avatar_url":"https://github.com/mefechoel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minimal Bundle\n\nThis is an example webpack config for a minimal bundle size.\nIt takes advantage of **es modules** with the `type=\"module\"`\nand `nomodule` attributes in script tags.\n\nIt showcases two strategies:\n- A simple single build with split bundles\n- A more advanced dual build with es5 bundles for legacy browsers and es6 bundles for modern browsers\n\n## Polyfills\n\nPolyfills are pieces of code that implement modern js\nfeatures that are not implemented in all browsers,\nsuch as `Promise`, `fetch`, `Symbol`, etc.\n\nThe challange is to provide these polyfills only for\nbrowsers, that do not support these features.\n\nModern browsers, that do implement all of those features,\nshould not need to download the code.\nUsually polyfill scripts will only provide the alternative\nimplementation if the feature is not supported natively.\nSo modern browsers will download and parse big bundles of \npolyfill scripts, but never use any of the code.\n\nA popular way of including polyfills in js bundles is to use\n`@babel/polyfill`.\nIt is a big script that needs to be downloaded and parsed.\nMost of it will never be used, though.\n\nIts minified size is **86.6kB**, which takes around\n**4.1sec** on a simulated slow 3G connection.\nThis can be improved by bundling a custom polyfill script,\nwhich only includes features used in the project.\nThat is a certain overhead, but it can decrease the filesize\nquite significantly.\n\nFor the sample app a set of commonly used polyfills is\nincluded.\nThis custom bundle is **47.1kB** big and takes around\n**3.4sec** on the same connection.\n\nThis technique improves loadtimes, but it adds the cost\nof dealing with polyfills yourself and modern devices\nstill download an unneccessarily big bundle.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmefechoel%2Fminimal-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmefechoel%2Fminimal-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmefechoel%2Fminimal-bundle/lists"}