extension-develop 3.0.0-next.8 → 3.0.0-next.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.js +21 -2
- package/package.json +1 -1
package/dist/module.js
CHANGED
|
@@ -371,7 +371,7 @@ var __webpack_modules__ = {
|
|
|
371
371
|
});
|
|
372
372
|
},
|
|
373
373
|
"./package.json": function(module) {
|
|
374
|
-
module.exports = JSON.parse('{"i8":"3.0.0-next.
|
|
374
|
+
module.exports = JSON.parse('{"i8":"3.0.0-next.8","HO":{"@rspack/core":"^1.6.3","@rspack/dev-server":"^1.1.4","@swc/core":"^1.13.2","@swc/helpers":"^0.5.15","adm-zip":"^0.5.16","browser-extension-manifest-fields":"^2.2.1","case-sensitive-paths-webpack-plugin":"^2.4.0","chokidar":"^4.0.1","chrome-location2":"3.2.1","chromium-location":"1.2.3","content-security-policy-parser":"^0.6.0","cross-spawn":"^7.0.6","dotenv":"^16.4.7","edge-location":"^2.1.1","firefox-location2":"2.1.1","go-git-it":"^5.0.0","ignore":"^6.0.2","loader-utils":"^3.3.1","magic-string":"^0.30.10","package-manager-detector":"^0.2.7","parse5":"^7.2.1","parse5-utilities":"^1.0.0","pintor":"0.3.0","schema-utils":"^4.2.0","tiny-glob":"^0.2.9","unique-names-generator":"^4.7.1","webextension-polyfill":"^0.12.0","webpack-merge":"^6.0.1","webpack-target-webextension":"^2.1.3","ws":"^8.18.0"},"Lq":{"@prefresh/core":"^1.5.2","@prefresh/utils":"^1.2.0","@prefresh/webpack":"^4.0.1","@rspack/plugin-preact-refresh":"^1.1.2","@rspack/plugin-react-refresh":"^1.0.1","@vue/compiler-sfc":"^3.5.13","babel-loader":"^9.2.1","less-loader":"^12.2.0","postcss-loader":"^8.1.1","postcss-preset-env":"^10.1.1","react-refresh":"^0.14.2","sass-loader":"^16.0.4","svelte-loader":"^3.2.4","vue-loader":"^17.4.2","vue-style-loader":"^4.1.3"}}');
|
|
375
375
|
}
|
|
376
376
|
};
|
|
377
377
|
var __webpack_module_cache__ = {};
|
|
@@ -5138,6 +5138,7 @@ var __webpack_exports__ = {};
|
|
|
5138
5138
|
}
|
|
5139
5139
|
const external_webpack_target_webextension_namespaceObject = require("webpack-target-webextension");
|
|
5140
5140
|
var external_webpack_target_webextension_default = /*#__PURE__*/ __webpack_require__.n(external_webpack_target_webextension_namespaceObject);
|
|
5141
|
+
const external_node_module_namespaceObject = require("node:module");
|
|
5141
5142
|
function manifest_getManifestContent(compilation, manifestPath) {
|
|
5142
5143
|
var _compilation_getAsset, _compilation_assets;
|
|
5143
5144
|
if ((null == (_compilation_getAsset = compilation.getAsset) ? void 0 : _compilation_getAsset.call(compilation, 'manifest.json')) || (null == (_compilation_assets = compilation.assets) ? void 0 : _compilation_assets['manifest.json'])) {
|
|
@@ -5498,6 +5499,15 @@ var __webpack_exports__ = {};
|
|
|
5498
5499
|
else obj[key] = value;
|
|
5499
5500
|
return obj;
|
|
5500
5501
|
}
|
|
5502
|
+
const requireForEsm = (0, external_node_module_namespaceObject.createRequire)(__rslib_import_meta_url__);
|
|
5503
|
+
function tryLoadWebExtensionFork() {
|
|
5504
|
+
try {
|
|
5505
|
+
const mod = requireForEsm('./webpack-target-webextension-fork');
|
|
5506
|
+
return mod && (mod.default || mod);
|
|
5507
|
+
} catch {
|
|
5508
|
+
return null;
|
|
5509
|
+
}
|
|
5510
|
+
}
|
|
5501
5511
|
class SetupReloadStrategy {
|
|
5502
5512
|
getEntryName(manifest) {
|
|
5503
5513
|
if (manifest.background) {
|
|
@@ -5534,6 +5544,16 @@ var __webpack_exports__ = {};
|
|
|
5534
5544
|
manifestPath: this.manifestPath,
|
|
5535
5545
|
browser: this.browser
|
|
5536
5546
|
}).apply(compiler);
|
|
5547
|
+
const wantFork = 'true' === process.env.EXTENSION_EXPERIMENTAL_HMR;
|
|
5548
|
+
if (wantFork) {
|
|
5549
|
+
const Fork = tryLoadWebExtensionFork();
|
|
5550
|
+
const PluginCtor = Fork || external_webpack_target_webextension_default();
|
|
5551
|
+
new PluginCtor({
|
|
5552
|
+
background: this.getEntryName(patchedManifest),
|
|
5553
|
+
weakRuntimeCheck: true
|
|
5554
|
+
}).apply(compiler);
|
|
5555
|
+
return;
|
|
5556
|
+
}
|
|
5537
5557
|
new (external_webpack_target_webextension_default())({
|
|
5538
5558
|
background: this.getEntryName(patchedManifest),
|
|
5539
5559
|
weakRuntimeCheck: true
|
|
@@ -6061,7 +6081,6 @@ var __webpack_exports__ = {};
|
|
|
6061
6081
|
].filter(Boolean);
|
|
6062
6082
|
return parts.join(" \u2014 ");
|
|
6063
6083
|
}
|
|
6064
|
-
const external_node_module_namespaceObject = require("node:module");
|
|
6065
6084
|
function throw_if_manifest_json_change_define_property(obj, key, value) {
|
|
6066
6085
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
6067
6086
|
value: value,
|