extension-develop 3.0.0-next.41 → 3.0.0-next.42

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.
Files changed (2) hide show
  1. package/dist/module.js +28 -6
  2. 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.41","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"}}');
5103
+ module.exports = JSON.parse('{"i8":"3.0.0-next.42","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__ = {};
@@ -6520,17 +6520,39 @@ var __webpack_exports__ = {};
6520
6520
  }
6521
6521
  }
6522
6522
  }
6523
+ let plugins;
6524
+ try {
6525
+ const req = (0, external_module_namespaceObject.createRequire)(external_path_.join(projectPath, 'package.json'));
6526
+ const plc = req('postcss-load-config');
6527
+ const loadConfig = 'function' == typeof plc ? plc : (null == plc ? void 0 : plc.default) ? plc.default : plc;
6528
+ if ('function' == typeof loadConfig) {
6529
+ const result = await loadConfig({}, projectPath);
6530
+ if (Array.isArray(null == result ? void 0 : result.plugins)) plugins = result.plugins;
6531
+ else if ((null == result ? void 0 : result.plugins) && 'object' == typeof result.plugins) plugins = Object.entries(result.plugins).map(([plugin, options])=>{
6532
+ try {
6533
+ const mod = 'string' == typeof plugin ? req(plugin) : plugin;
6534
+ return 'function' == typeof mod ? mod(options) : mod;
6535
+ } catch {
6536
+ return;
6537
+ }
6538
+ }).filter(Boolean);
6539
+ }
6540
+ } catch {}
6541
+ const postcssOptions = {
6542
+ ident: 'postcss',
6543
+ cwd: projectPath
6544
+ };
6545
+ if (plugins && plugins.length) {
6546
+ postcssOptions.config = false;
6547
+ postcssOptions.plugins = plugins;
6548
+ } else postcssOptions.config = projectPath;
6523
6549
  return {
6524
6550
  test: /\.css$/,
6525
6551
  type: 'css',
6526
6552
  loader: require.resolve('postcss-loader'),
6527
6553
  options: {
6528
6554
  implementation: getProjectPostcssImpl(),
6529
- postcssOptions: {
6530
- ident: 'postcss',
6531
- cwd: projectPath,
6532
- config: projectPath
6533
- },
6555
+ postcssOptions,
6534
6556
  sourceMap: 'development' === opts.mode
6535
6557
  }
6536
6558
  };
package/package.json CHANGED
@@ -21,7 +21,7 @@
21
21
  "dist"
22
22
  ],
23
23
  "name": "extension-develop",
24
- "version": "3.0.0-next.41",
24
+ "version": "3.0.0-next.42",
25
25
  "description": "The develop step of Extension.js",
26
26
  "author": {
27
27
  "name": "Cezar Augusto",