Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

robotstxt-webpack-plugin

itgalaxy61.9kMIT8.0.0

A webpack plugin to output a robots.txt file

robots.txt, robots, robotstxt, generate, robots-txt, user-agent, webpack, webpack-plugin, plugin

readme

NPM version Travis Build Status dependencies Status devDependencies Status

robotstxt-webpack-plugin

Generating robots.txt using webpack.

Why your need robots.txt?

Webpack plugin for generate-robotstxt package.

Getting Started

To begin, you'll need to install robotstxt-webpack-plugin:

npm install --save-dev robotstxt-webpack-plugin

webpack.config.js

const RobotstxtPlugin = require("robotstxt-webpack-plugin");

const options = {}; // see options below

module.exports = {
  plugins: [new RobotstxtPlugin(options)],
};

Options

  • filePath - (optional) path for robots.txt (should be contain full path include robots.txt file name, example - path/to/robots.txt).
  • General options - see generate-robotstxt options.

Contribution

Feel free to push your code if you agree with publishing under the MIT license.

Changelog

MIT

License

MIT

changelog

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

8.0.0 (2022-08-29)

⚠ BREAKING CHANGES

  • minimum supported webpack version is 5
  • minimum supported Node.js version is 14.15.0

Bug Fixes

7.0.0 - 2019-11-05

  • Changed: minimum require Node.js version is 10.13.0.

6.0.0 - 2019-07-03

  • Changed: use additionalAssets hook for adding assets.
  • Changed: minimum require Node.js version is 8.9.0.

5.0.0 - 2019-01-09

BREAKING CHANGE

  • Feature: rename RobotstxtWebpackPlugin to RobotstxtPlugin.
  • Feature: exports plugin as cjs by default (no need use default for require in webpack.config.js).
  • Chore: minimum require webpack version is 4.
  • Chore: minimum require nodejs version is 6.

4.0.1 - 2018-02-26

  • Fixed: tapable deprecation warnings (webpack >= v4.0.0).

4.0.0 - 2017-11-15

  • Chore Breaking Changes: minimum required generate-robotstxt version is now ^5.0.0.

3.0.2 - 2017-10-10

  • Chore: republish new version, because old was break.

3.0.1 - 2017-10-10

  • Chore: republish new version, because old was break.

3.0.0 - 2017-10-09

  • Changed: rename from dest to filePath.
  • Changed: dest should contain file name (example - /path/to/robots.txt).

2.0.0 - 2017-06-20

  • Chore: support webpack v3.
  • Changed: minimum require nodejs version is now 4.3.

1.0.1 - 2017-02-01

  • Fixed: added webpack as peer dependencies.

1.0.0 - 2016-11-11

  • Documentation: improve README.md.

1.0.0-alpha.1 - 2016-11-11

  • Chore: initial public release.