A webpack plugin to output a robots.txt file
npm install robotstxt-webpack-plugin



Generating robots.txt using webpack.
Why your need robots.txt?
Webpack plugin for generate-robotstxt package.
To begin, you'll need to install robotstxt-webpack-plugin:
``console`
npm install --save-dev robotstxt-webpack-plugin
webpack.config.js
`js
const RobotstxtPlugin = require("robotstxt-webpack-plugin");
const options = {}; // see options below
module.exports = {
plugins: [new RobotstxtPlugin(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.
-
- generate-robotstxt - api for this package.
Feel free to push your code if you agree with publishing under the MIT license.