Socket
Socket
Sign inDemoInstall

a2bei4-rollup-plugin

Package Overview
Dependencies
80
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    a2bei4-rollup-plugin

rollup插件:监听外部文件(无关文件)、通过配置自动刷新页面


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

a2bei4-rollup-plugin

rollup 插件。监听外部文件(无关文件)、通过配置自动刷新页面

监听无关文件

使用 rollup 中的"addWatchFile"方法,监听依赖树中没有的文件,使得文件修改之后可以出发编译。

自动刷线页面

修改文件之后自动帮助开发者刷新页面,也就是热更新。因为项目的原因,不能使用 livereload 这类插件,于是便自己研究一番……

selenium 方式

puppeteer 方式

sse 或者 ws 方式

这种方案,这里觉得是最好的方案。该插件作为 ssw 或者 ws 的服务器,待文件修改触发编译之后便推送消息给客户端(这里指的是 a2bei4-auto-reload-tab, 一款 edge、chrome 扩展项目),最后该扩展收到消息之后帮助我们刷新页面……

Keywords

FAQs

Last updated on 07 Nov 2022

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc