vite-plugin-robots

Vite plugin for generating robots.txt for production and development builds
85,038 20
Install
npm install vite-plugin-robots
Latest Version:1.0.5
License:MIT
Last Updated:May 15, 2024
Links: GitHub  ·  npm
Maintainer: kolirt

Introduction

The package allows you to customize different robots.txt for production mode and development mode.

vite build
vite build --mode=development

Installation

Use yarn or npm to install the package vite-plugin-robots.

npm install -D vite-plugin-robots

yarn add --dev vite-plugin-robots

Setup

import { robots } from 'vite-plugin-robots'
import { defineConfig } from 'vite'

export default defineConfig({
  plugins: [
    robots({
      /* pass your config */
    })
  ]
})

Configuration robot.txt

The package copies the corresponding robots.txt according to the build mode.

.robots.[mode].txt         # only loaded in specified mode
.robots.[mode].txt.local   # only loaded in specified mode, ignored by git

Create .robots.production.txt and .robots.development.txt in the project root and the package will start using them.

License

MIT

Related Packages

webpack-vite-serve

为webpack项目提供一键接入Vite的能力

848 15
@myeasyfarm/vite-plugin-icons-spritesheet

Vite plugin that generates a spritesheet and types out of your icons folder.

9,140 0
vite-plugin-dev-inspector

jump to local IDE source code while click the element of browser automatically.

6,946 51
vite-plugin-code-inspector

jump to local IDE source code while click the element of browser automatically.

750 5
domagic-vite-plugin

A development-only Vite plugin for DOM source mapping and AI-assisted style edit...

8,113

Version History

Version Released License
1.0.5 MIT
1.0.4 MIT
1.0.3 MIT
1.0.2 MIT
1.0.1 MIT