@stacksjs/stx 0.2.115 → 0.2.116

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/includes.js CHANGED
@@ -180,9 +180,10 @@ function extractExports(setupContent) {
180
180
  return names.join(", ");
181
181
  }
182
182
  function wrapClientScript(scriptContent, tail = "") {
183
+ const localNames = extractExports(scriptContent).split(",").map((name) => name.trim()).filter(Boolean);
183
184
  return `
184
185
  (function() {
185
- ${buildRuntimeGlobalsDestructure("var")}
186
+ ${buildRuntimeGlobalsDestructure("var", localNames)}
186
187
  var __destroyHooks = [];
187
188
  var __origOnDestroy = onDestroy;
188
189
  onDestroy = function(fn) { __origOnDestroy(fn); __destroyHooks.push(fn); };