{"id":15020093,"url":"https://github.com/tanepiper/robots-webpack-plugin","last_synced_at":"2025-06-16T08:32:19.868Z","repository":{"id":57164468,"uuid":"52367801","full_name":"tanepiper/robots-webpack-plugin","owner":"tanepiper","description":" A webpack plugin to output a robots.txt file with options per environment","archived":false,"fork":false,"pushed_at":"2016-10-11T09:15:10.000Z","size":12,"stargazers_count":14,"open_issues_count":2,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-18T02:18:54.466Z","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/tanepiper.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":"2016-02-23T15:11:21.000Z","updated_at":"2020-05-21T14:45:29.000Z","dependencies_parsed_at":"2022-09-12T01:00:49.603Z","dependency_job_id":null,"html_url":"https://github.com/tanepiper/robots-webpack-plugin","commit_stats":null,"previous_names":["tanepiper/webpack-robotstxt"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tanepiper/robots-webpack-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanepiper%2Frobots-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanepiper%2Frobots-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanepiper%2Frobots-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanepiper%2Frobots-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanepiper","download_url":"https://codeload.github.com/tanepiper/robots-webpack-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanepiper%2Frobots-webpack-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260126402,"owners_count":22962640,"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":"2024-09-24T19:54:34.837Z","updated_at":"2025-06-16T08:32:19.846Z","avatar_url":"https://github.com/tanepiper.png","language":"JavaScript","readme":"## Webpack Robots.txt\n\nA webpack plugin for generating robots.txt files.\n\n### Why is this plugin useful\n\nWhen you have multiple environments such as dev, qa and production to want to ensure your non-production environments\nare not exposed to search engines such as Google.\n\nThis plugin allows you to include this in your environment settings to generate a file.\n\n### Install the plugin\n\n`npm install --save-dev @tanepiper/robots-webpack-plugin`\n\n### How to I use this plugin?\n\nIn your webpack config:\n\n```\nconst RobotsPlugin = require('@tanepiper/robots-webpack-plugin');\n\nconst webpackConfig = {\n  entry: 'src/index.js',\n  output: {\n    path: '/public',\n    filename: 'index.js'\n  },\n  plugins: [new RobotsPlugin()]\n};\n```\n\nThe default output is an `Allow` directive for all user agents.  To configure, pass in an array to userAgents option.\nEach one is an object with a `name:string`, `disallow:array` and `allow:array` in any combination.\n\nThere is also the sitemap options which will output a Sitemap directive at the end. Just provide a full url to the sitemap file.\n\n```\nplugins: [new RobotsPlugin({\n  sitemap: 'https://example.com/sitemap.xml',\n  userAgents: [{\n    name: '*',\n    disallow: ['/', '/cgi-bin'],\n    allow: ['/blog']\n  }, {\n   name: 'Googlebot',\n   disallow: ['/cgi-bin', '/some-path'],\n   allow: ['/']\n }]\n})]\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanepiper%2Frobots-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanepiper%2Frobots-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanepiper%2Frobots-webpack-plugin/lists"}