@absolutejs/absolute 0.19.0-beta.387 → 0.19.0-beta.389

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/build.js CHANGED
@@ -171815,7 +171815,26 @@ var resolveDevClientDir2 = () => {
171815
171815
  }, devClientDir2, hmrClientPath3, persistentCache, sourceHashCache, clearSvelteCompilerCache = () => {
171816
171816
  persistentCache.clear();
171817
171817
  sourceHashCache.clear();
171818
- }, transpiler2, exists = async (path) => {
171818
+ }, transpiler2, removeUnusedRequireHelper = (code) => {
171819
+ const requireMatches = code.match(/\b__require\b/g);
171820
+ if (requireMatches && requireMatches.length > 1) {
171821
+ return code;
171822
+ }
171823
+ const helperStart = code.indexOf("var __require = /* @__PURE__ */");
171824
+ if (helperStart === -1) {
171825
+ return code;
171826
+ }
171827
+ const helperEndMarker = `throw Error('Dynamic require of "' + x + '" is not supported');`;
171828
+ const helperEnd = code.indexOf(helperEndMarker, helperStart);
171829
+ if (helperEnd === -1) {
171830
+ return code;
171831
+ }
171832
+ const statementEnd = code.indexOf("});", helperEnd);
171833
+ if (statementEnd === -1) {
171834
+ return code;
171835
+ }
171836
+ return `${code.slice(0, helperStart)}${code.slice(statementEnd + 3)}`;
171837
+ }, exists = async (path) => {
171819
171838
  try {
171820
171839
  await stat(path);
171821
171840
  return true;
@@ -171981,6 +172000,9 @@ var resolveDevClientDir2 = () => {
171981
172000
  var __hmr_accept = function(cb) { window.__SVELTE_HMR_ACCEPT__[${JSON.stringify(moduleKey)}] = cb; };`);
171982
172001
  code = code.replace(/import\.meta\.hot\.accept\(/g, "__hmr_accept(");
171983
172002
  }
172003
+ if (mode === "client") {
172004
+ code = removeUnusedRequireHelper(code);
172005
+ }
171984
172006
  code += islandMetadataExports;
171985
172007
  return code;
171986
172008
  };
@@ -179196,5 +179218,5 @@ export {
179196
179218
  build
179197
179219
  };
179198
179220
 
179199
- //# debugId=8C933E96412D3D6164756E2164756E21
179221
+ //# debugId=2A04BA041CE4D42C64756E2164756E21
179200
179222
  //# sourceMappingURL=build.js.map