Webpack plugin for generate-robotstxt package. Generating robots.txt using webpack. Why your need robots.txt?
npm install --save-dev robotstxt-webpack-plugin
const RobotstxtPlugin = require('robotstxt-webpack-plugin').default;
const options = {}; // see options below
module.exports = {
plugins: [
new RobotstxtPlugin(options)
]
}
Or
import RobotstxtPlugin from 'robotstxt-webpack-plugin';
const options = {}; // see options below
export default {
plugins: [
new RobotstxtPlugin(options)
]
};
General options
- see generate-robotstxt options.dest
- (optional) directory which will be saved robots.txt (relatively of the optionoutput.path
value).
- generate-robotstxt - api for this package.
Feel free to push your code if you agree with publishing under the MIT license.