Socket
Book a DemoInstallSign in
Socket

vite-plugin-robots

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-robots

Vite plugin for generating robots.txt for production and development builds

1.0.5
latest
Source
npmnpm
Version published
Weekly downloads
2.2K
25.23%
Maintainers
1
Weekly downloads
 
Created
Source
vite logo

Vite Robots.txt

Plugin for Vite to generating robots.txt for production and development builds.

node-current npm peer dependency version npm bundle size npm-version licence

Buy Me A Coffee

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

Keywords

vite

FAQs

Package last updated on 20 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.