vite-plugin-entry-inject

1.0.2 • Public • Published

vite-plugin-entry-inject

修改打包后入口文件在html中的注入位置

使用说明

npm install --save-dev vite-plugin-entry-inject
# or
yarn add vite-plugin-entry-inject -D
// vite.config.js
import VitePluginEntryInject from 'vite-plugin-entry-inject';

export default {
    plugins: [{
        VitePluginEntryInject({
            // head-prepend/head/body-prepend/body
            injectTo: 'body'
        })
    }]
};

参数

injectTo

  • Type: string
  • Default: body

入口文件注入位置,默认body,即body闭合标签</body>前,可选。

  • head-prepend: <head>开始标签后
  • head: </head>闭合标签前
  • body-prepend: <body>开始标签后
  • body: </body>闭合标签前

Readme

Keywords

none

Package Sidebar

Install

npm i vite-plugin-entry-inject

Weekly Downloads

978

Version

1.0.2

License

ISC

Unpacked Size

2.79 kB

Total Files

3

Last publish

Collaborators

  • baie