install robotstxt-webpack-plugin.js
npm i robotstxt-webpack-plugin
in your quasar.conf.js
import
const RobotstxtPlugin = require("robotstxt-webpack-plugin");
const options = {
filePath: "/robots.txt",
policy: [
{
userAgent: "*",
Allow: 'All',
crawlDelay: 30
}
],
sitemap: "https://example.com/sitemap.xml",
host: "https://example.com"
};
build: {
scopeHoisting: true,
vueRouterMode: "history", // available values: 'hash', 'history'
showProgress: true,
gzip: false,
analyze: false,
// Options below are automatically set depending on the env, set them if you want to override
// preloadChunks: false,
extractCSS: true,
// https://quasar.dev/quasar-cli/cli-documentation/handling-webpack
extendWebpack(cfg) {
cfg.plugins.push(
new RobotstxtPlugin(options)
);
}
},