Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hot-reload-extension-vite

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hot-reload-extension-vite - npm Package Compare versions

Comparing version 1.0.11 to 1.0.12

4

dist/main.js

@@ -554,3 +554,2 @@ "use strict";

// src/main.ts
var IS_TRANSFORMED = false;
var hotReloadExtension = (options) => {

@@ -570,7 +569,6 @@ const { log, backgroundPath } = options;

async transform(code, id) {
if (!isDev || IS_TRANSFORMED) {
if (!isDev) {
return;
}
if (id.includes(backgroundPath)) {
IS_TRANSFORMED = true;
const buffer = import_fs.default.readFileSync((0, import_path.resolve)(__dirname, "scripts/background-reload.js"));

@@ -577,0 +575,0 @@ return {

@@ -9,7 +9,11 @@ "use strict";

var socket = new WebSocket(`ws://localhost:${HOT_RELOAD_EXTENSION_VITE_PORT}`);
chrome.runtime.onInstalled.addListener((details) => {
if (details.reason === chrome.runtime.OnInstalledReason.UPDATE) {
chrome.tabs.reload();
}
});
socket.addEventListener("message", (event) => {
if (event.data === "file-change" /* FILE_CHANGE */) {
chrome.runtime.reload();
chrome.tabs.reload();
}
});
{
"name": "hot-reload-extension-vite",
"version": "1.0.11",
"version": "1.0.12",
"description": "Simple vite plugin to reload the chrome extension.",

@@ -5,0 +5,0 @@ "main": "dist/main.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc