extension-develop 3.0.0-next.43 → 3.0.0-next.45
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 +22 -4
- package/package.json +1 -1
package/dist/module.js
CHANGED
|
@@ -5100,7 +5100,7 @@ var __webpack_modules__ = {
|
|
|
5100
5100
|
},
|
|
5101
5101
|
"./package.json": function(module) {
|
|
5102
5102
|
"use strict";
|
|
5103
|
-
module.exports = JSON.parse('{"i8":"3.0.0-next.
|
|
5103
|
+
module.exports = JSON.parse('{"i8":"3.0.0-next.45","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"}}');
|
|
5104
5104
|
}
|
|
5105
5105
|
};
|
|
5106
5106
|
var __webpack_module_cache__ = {};
|
|
@@ -6519,7 +6519,21 @@ var __webpack_exports__ = {};
|
|
|
6519
6519
|
}
|
|
6520
6520
|
}
|
|
6521
6521
|
let plugins;
|
|
6522
|
-
|
|
6522
|
+
(0, external_module_namespaceObject.createRequire)(external_path_.join(projectPath, 'package.json'));
|
|
6523
|
+
function resolvePluginFromProjectOrWorkspace(name) {
|
|
6524
|
+
const bases = [
|
|
6525
|
+
projectPath,
|
|
6526
|
+
process.cwd()
|
|
6527
|
+
];
|
|
6528
|
+
let lastError;
|
|
6529
|
+
for (const base of bases)try {
|
|
6530
|
+
const req = (0, external_module_namespaceObject.createRequire)(external_path_.join(base, 'package.json'));
|
|
6531
|
+
return req(name);
|
|
6532
|
+
} catch (e) {
|
|
6533
|
+
lastError = e;
|
|
6534
|
+
}
|
|
6535
|
+
throw lastError ?? new Error(`Cannot resolve PostCSS plugin "${name}"`);
|
|
6536
|
+
}
|
|
6523
6537
|
async function loadConfigFromFile(configPath) {
|
|
6524
6538
|
try {
|
|
6525
6539
|
if (configPath.endsWith('.mjs') || configPath.endsWith('.mts')) {
|
|
@@ -6544,7 +6558,7 @@ var __webpack_exports__ = {};
|
|
|
6544
6558
|
const [plugin, options] = entry;
|
|
6545
6559
|
if ('function' == typeof plugin) return plugin(options);
|
|
6546
6560
|
if ('string' == typeof plugin) {
|
|
6547
|
-
const mod =
|
|
6561
|
+
const mod = resolvePluginFromProjectOrWorkspace(plugin);
|
|
6548
6562
|
return 'function' == typeof mod ? mod(options) : mod;
|
|
6549
6563
|
}
|
|
6550
6564
|
}
|
|
@@ -6556,7 +6570,7 @@ var __webpack_exports__ = {};
|
|
|
6556
6570
|
else if (configPlugins && 'object' == typeof configPlugins) plugins = Object.entries(configPlugins).map(([plugin, options])=>{
|
|
6557
6571
|
if (false === options) return;
|
|
6558
6572
|
try {
|
|
6559
|
-
const mod = 'string' == typeof plugin ?
|
|
6573
|
+
const mod = 'string' == typeof plugin ? resolvePluginFromProjectOrWorkspace(plugin) : plugin;
|
|
6560
6574
|
if ('function' == typeof mod) return true === options || void 0 === options ? mod() : mod(options);
|
|
6561
6575
|
return mod;
|
|
6562
6576
|
} catch {
|
|
@@ -6571,6 +6585,10 @@ var __webpack_exports__ = {};
|
|
|
6571
6585
|
postcssOptions.config = false;
|
|
6572
6586
|
postcssOptions.plugins = plugins;
|
|
6573
6587
|
} else postcssOptions.config = projectPath;
|
|
6588
|
+
if ('true' === process.env.EXTENSION_AUTHOR_MODE) try {
|
|
6589
|
+
console.log('[extension.js:postcss] projectPath=%s userPostCssConfig=%s pkgHasPostCss=%s tailwindPresent=%s', projectPath, userPostCssConfig || 'none', pkgHasPostCss, tailwindPresent);
|
|
6590
|
+
console.log('[extension.js:postcss] resolvedPlugins=%d config=%s cwd=%s', Array.isArray(plugins) ? plugins.length : 0, String(postcssOptions.config), String(postcssOptions.cwd));
|
|
6591
|
+
} catch {}
|
|
6574
6592
|
return {
|
|
6575
6593
|
test: /\.css$/,
|
|
6576
6594
|
type: 'css',
|