New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

web-auto-deploy

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

web-auto-deploy

web自动部署

latest
npmnpm
Version
0.0.5
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

web-auto-deploy

web自动部署

使用

vite

vite.config.ts

import {defineConfig} from "vite"
import webAutoDeploy from "web-auto-deploy/vite"
export default defineConfig({
    plugins:[
        webAutoDeploy()
    ]
})

webpack4.X + vue cli

vue.config.ts

const webAutoDeploy = require("web-auto-deploy/vite")
module.exports = {
    configureWebpack:{
        plugins: [
            new webAutoDeploy()
        ]
    }
}

webpack3.X + vue cli

在webpack插件位置添加以下代码

const transform = require("web-auto-deploy/vite")
{
    apply(compiler) {
        compiler.plugin('done', function (compilation, callback) {
            fs.writeFileSync(
                path.resolve(__dirname,'../dist/index.html'), 
                transform(fs.readFileSync(indexPath, 'utf-8'), {
                    enable:true,
                    interval: 3000,
                    beforeHtml:null,
                    afterHtml:null
                })
            )
        })
    }
}

FAQs

Package last updated on 20 Sep 2023

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