{"id":18656312,"url":"https://github.com/juntingl/web_front_end_env","last_synced_at":"2026-05-19T10:33:19.458Z","repository":{"id":114745511,"uuid":"157475660","full_name":"juntingl/web_front_end_env","owner":"juntingl","description":"基于 Webpack 4 搭建前端开发环境","archived":false,"fork":false,"pushed_at":"2018-11-14T02:11:47.000Z","size":48,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-27T14:44:12.540Z","etag":null,"topics":["webpack"],"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/juntingl.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-14T02:05:59.000Z","updated_at":"2018-12-10T05:57:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"d6f10af1-a0d4-481a-89d4-e293c0d0f757","html_url":"https://github.com/juntingl/web_front_end_env","commit_stats":null,"previous_names":["juntingl/web_front_end_env"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juntingl%2Fweb_front_end_env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juntingl%2Fweb_front_end_env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juntingl%2Fweb_front_end_env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juntingl%2Fweb_front_end_env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juntingl","download_url":"https://codeload.github.com/juntingl/web_front_end_env/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239471351,"owners_count":19644299,"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":["webpack"],"created_at":"2024-11-07T07:23:04.607Z","updated_at":"2026-05-19T10:33:19.431Z","avatar_url":"https://github.com/juntingl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Webpack 知识点回顾\n\n* `webpack` 构建 `production` 环境下代码时，会自动 `tree shaking` 清理无用多余的代码。但是检查不到函数和 `scope(块)`内部，无法 `tree shaking`。\n\n```js\nimport lodash from 'lodash-es';\n\nconst sync = function () {\n    console.log('Sync')\n}\n\nconst isArray = function (args) { // 此函数没有调用过，按理 tree shaking 会把 lodash、isArray 去除，但并没有\n    console.log(lodash.isArray(args))\n}\n\nexport {\n    sync,\n    isArray\n}\n```\n\n* 启用 `CSS modules`，根据文件夹为一个模块，在外面通过 module.test 的方式使用\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuntingl%2Fweb_front_end_env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuntingl%2Fweb_front_end_env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuntingl%2Fweb_front_end_env/lists"}