{"id":17328252,"url":"https://github.com/whtsky/babel-plugin-webpack-prefetch","last_synced_at":"2025-04-14T17:21:33.110Z","repository":{"id":31891934,"uuid":"130644708","full_name":"whtsky/babel-plugin-webpack-prefetch","owner":"whtsky","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-11T19:26:28.000Z","size":211,"stargazers_count":4,"open_issues_count":11,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T20:30:59.798Z","etag":null,"topics":["babel","babel-plugin","prefetch","webpack","webpack4"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/whtsky.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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-04-23T05:32:08.000Z","updated_at":"2024-02-07T10:39:58.000Z","dependencies_parsed_at":"2023-10-12T13:46:05.902Z","dependency_job_id":"b5249932-89e0-4888-8be3-50fb5d9db7cd","html_url":"https://github.com/whtsky/babel-plugin-webpack-prefetch","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whtsky%2Fbabel-plugin-webpack-prefetch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whtsky%2Fbabel-plugin-webpack-prefetch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whtsky%2Fbabel-plugin-webpack-prefetch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whtsky%2Fbabel-plugin-webpack-prefetch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/whtsky","download_url":"https://codeload.github.com/whtsky/babel-plugin-webpack-prefetch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248479119,"owners_count":21110822,"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":["babel","babel-plugin","prefetch","webpack","webpack4"],"created_at":"2024-10-15T14:23:11.195Z","updated_at":"2025-04-14T17:21:33.088Z","avatar_url":"https://github.com/whtsky.png","language":"JavaScript","readme":"# babel-plugin-webpack-prefetch\n\nBabel plugin for adding webpackPrefetch comment.\n\n[![license](https://img.shields.io/npm/l/babel-plugin-webpack-prefetch.svg)](https://github.com/whtsky/babel-plugin-webpack-prefetch/blob/master/LICENSE)\n[![npm](https://img.shields.io/npm/v/babel-plugin-webpack-prefetch.svg)](https://www.npmjs.com/package/babel-plugin-webpack-prefetch)\n[![Build Status](https://travis-ci.org/whtsky/babel-plugin-webpack-prefetch.svg?branch=master)](https://travis-ci.org/whtsky/babel-plugin-webpack-prefetch)\n[![codecov](https://codecov.io/gh/whtsky/babel-plugin-webpack-prefetch/branch/master/graph/badge.svg)](https://codecov.io/gh/whtsky/babel-plugin-webpack-prefetch)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fwhtsky%2Fbabel-plugin-webpack-prefetch.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fwhtsky%2Fbabel-plugin-webpack-prefetch?ref=badge_shield)\n\n## Usage\n\n```bash\nyarn add -D babel-plugin-webpack-prefetch\n```\n\nthen add `babel-plugin-webpack-prefetch` to your `.babelrc`\n\n```diff .babelrc\n{\n  \"plugins\": [\n+    \"babel-plugin-webpack-prefetch\"\n  ]\n}\n```\n\nAnd it does :\n```diff a.js\nimport ccc from 'ddd'\nimport 'aaa'\n\nconst a = import(\n+ /* webpackPrefetch: true */\n'aaa'\n)\nconst b = import(\n+ /* webpackPrefetch: true */\n'bbb'\n)\n```\n\n`babel-plugin-webpack-prefetch` will respect your comment :\n```diff a.js\nconst a = import(\n// you added webpackPrefetch: false so babel-plugin-webpack-prefetch will not modify it\n/* webpackPrefetch: false */\n'aaa'\n)\nconst b = import(\n+ /* webpackPrefetch: true */\n'bbb'\n)\n```\n\n## License\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fwhtsky%2Fbabel-plugin-webpack-prefetch.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fwhtsky%2Fbabel-plugin-webpack-prefetch?ref=badge_large)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhtsky%2Fbabel-plugin-webpack-prefetch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhtsky%2Fbabel-plugin-webpack-prefetch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhtsky%2Fbabel-plugin-webpack-prefetch/lists"}