extension-develop 3.6.1 → 3.6.3

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.cjs +20 -33
  2. package/package.json +1 -1
package/dist/module.cjs CHANGED
@@ -132542,7 +132542,7 @@ var __webpack_modules__ = {
132542
132542
  a: ()=>isUsingSvelte
132543
132543
  });
132544
132544
  var path__rspack_import_0 = __webpack_require__("path");
132545
- var module__rspack_import_1 = __webpack_require__("module");
132545
+ var fs__rspack_import_1 = __webpack_require__("fs");
132546
132546
  var _js_frameworks_lib_messages__rspack_import_2 = __webpack_require__("./webpack/plugin-js-frameworks/js-frameworks-lib/messages.ts");
132547
132547
  var _frameworks_lib_integrations__rspack_import_3 = __webpack_require__("./webpack/plugin-js-frameworks/frameworks-lib/integrations.ts");
132548
132548
  var _js_frameworks_lib_load_loader_options__rspack_import_4 = __webpack_require__("./webpack/plugin-js-frameworks/js-frameworks-lib/load-loader-options.ts");
@@ -132635,47 +132635,34 @@ var __webpack_modules__ = {
132635
132635
  }
132636
132636
  }
132637
132637
  ];
132638
- const requireFromProject = (0, module__rspack_import_1.createRequire)(path__rspack_import_0.join(projectPath, 'package.json'));
132639
- const resolveSvelteRuntime = (id)=>{
132640
- try {
132641
- return requireFromProject.resolve(id);
132642
- } catch {
132643
- return;
132644
- }
132638
+ const sveltePackageJson = resolveFromProject('svelte/package.json', projectPath);
132639
+ const sveltePackageRoot = sveltePackageJson ? path__rspack_import_0.dirname(sveltePackageJson) : void 0;
132640
+ const resolveClientSubpath = (relative)=>{
132641
+ const direct = resolveFromProject(`svelte/${relative}`, projectPath);
132642
+ if (direct) return direct;
132643
+ if (!sveltePackageRoot) return;
132644
+ const fromRoot = path__rspack_import_0.join(sveltePackageRoot, relative);
132645
+ return fs__rspack_import_1.existsSync(fromRoot) ? fromRoot : void 0;
132645
132646
  };
132646
132647
  const alias = {};
132647
- const svelteEntry = resolveSvelteRuntime('svelte');
132648
- const svelteInternal = resolveSvelteRuntime('svelte/internal');
132649
- const svelteStore = resolveSvelteRuntime('svelte/store');
132650
- const svelteMotion = resolveSvelteRuntime('svelte/motion');
132651
- const svelteTransition = resolveSvelteRuntime('svelte/transition');
132652
- if (svelteEntry) alias.svelte = svelteEntry;
132653
- if (svelteInternal) alias['svelte/internal'] = svelteInternal;
132654
- if (svelteStore) alias['svelte/store'] = svelteStore;
132655
- if (svelteMotion) alias['svelte/motion'] = svelteMotion;
132656
- if (svelteTransition) alias['svelte/transition'] = svelteTransition;
132648
+ const svelteClient = resolveClientSubpath('src/index-client.js');
132649
+ const svelteStoreClient = resolveClientSubpath('src/store/index-client.js');
132650
+ const svelteReactivityClient = resolveClientSubpath('src/reactivity/index-client.js');
132651
+ const svelteLegacyClient = resolveClientSubpath('src/legacy/legacy-client.js');
132652
+ if (svelteClient) alias.svelte = svelteClient;
132653
+ if (svelteStoreClient) alias['svelte/store'] = svelteStoreClient;
132654
+ if (svelteReactivityClient) alias['svelte/reactivity'] = svelteReactivityClient;
132655
+ if (svelteLegacyClient) alias['svelte/legacy'] = svelteLegacyClient;
132657
132656
  const resolverPlugin = {
132658
132657
  apply (compiler) {
132659
132658
  const existingMainFields = compiler.options.resolve && compiler.options.resolve.mainFields || [];
132660
- const existingConditionNames = compiler.options.resolve && (compiler.options.resolve.conditionNames || compiler.options.resolve.conditions) || [];
132661
132659
  const existingExtensions = compiler.options.resolve && compiler.options.resolve.extensions || [];
132662
132660
  const existingAlias = compiler.options.resolve && compiler.options.resolve.alias || {};
132663
132661
  const existingModules = compiler.options.resolve && compiler.options.resolve.modules || [];
132664
- const nextMainFields = [
132665
- 'svelte',
132666
- 'browser',
132667
- 'module',
132668
- 'main',
132669
- ...existingMainFields
132670
- ];
132671
132662
  const dedupe = (arr)=>Array.from(new Set(arr));
132672
132663
  compiler.options.resolve = {
132673
132664
  ...compiler.options.resolve,
132674
- mainFields: dedupe(nextMainFields),
132675
- conditionNames: dedupe([
132676
- 'svelte',
132677
- ...existingConditionNames
132678
- ]),
132665
+ mainFields: dedupe(existingMainFields),
132679
132666
  extensions: dedupe([
132680
132667
  '.svelte',
132681
132668
  ...existingExtensions
@@ -132693,7 +132680,7 @@ var __webpack_modules__ = {
132693
132680
  resolverPlugin
132694
132681
  ],
132695
132682
  loaders: defaultLoaders,
132696
- alias
132683
+ alias: Object.keys(alias).length > 0 ? alias : void 0
132697
132684
  };
132698
132685
  }
132699
132686
  },
@@ -134378,7 +134365,7 @@ var __webpack_modules__ = {
134378
134365
  },
134379
134366
  "./package.json" (module) {
134380
134367
  "use strict";
134381
- module.exports = JSON.parse('{"rE":"3.6.1","El":{"@rspack/core":"^1.7.5","@rspack/dev-server":"^1.1.5","@swc/core":"^1.15.8","@swc/helpers":"^0.5.18","adm-zip":"^0.5.16","browser-extension-manifest-fields":"^2.2.1","case-sensitive-paths-webpack-plugin":"^2.4.0","chrome-location2":"4.0.0","chromium-location":"2.0.0","content-security-policy-parser":"^0.6.0","cross-spawn":"^7.0.6","dotenv":"^17.2.3","edge-location":"2.2.0","extension-from-store":"^0.1.1","firefox-location2":"3.0.0","go-git-it":"^5.1.1","ignore":"^7.0.5","loader-utils":"^3.3.1","magic-string":"^0.30.21","parse5":"^8.0.0","parse5-utilities":"^1.0.0","pintor":"0.3.0","schema-utils":"^4.3.3","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.19.0"}}');
134368
+ module.exports = JSON.parse('{"rE":"3.6.3","El":{"@rspack/core":"^1.7.5","@rspack/dev-server":"^1.1.5","@swc/core":"^1.15.8","@swc/helpers":"^0.5.18","adm-zip":"^0.5.16","browser-extension-manifest-fields":"^2.2.1","case-sensitive-paths-webpack-plugin":"^2.4.0","chrome-location2":"4.0.0","chromium-location":"2.0.0","content-security-policy-parser":"^0.6.0","cross-spawn":"^7.0.6","dotenv":"^17.2.3","edge-location":"2.2.0","extension-from-store":"^0.1.1","firefox-location2":"3.0.0","go-git-it":"^5.1.1","ignore":"^7.0.5","loader-utils":"^3.3.1","magic-string":"^0.30.21","parse5":"^8.0.0","parse5-utilities":"^1.0.0","pintor":"0.3.0","schema-utils":"^4.3.3","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.19.0"}}');
134382
134369
  }
134383
134370
  };
134384
134371
  var __webpack_module_cache__ = {};
package/package.json CHANGED
@@ -24,7 +24,7 @@
24
24
  "webpack/webpack-lib/build-dependencies.json"
25
25
  ],
26
26
  "name": "extension-develop",
27
- "version": "3.6.1",
27
+ "version": "3.6.3",
28
28
  "description": "Develop, build, preview, and package Extension.js projects.",
29
29
  "author": {
30
30
  "name": "Cezar Augusto",