@absolutejs/absolute 0.19.0-beta.40 → 0.19.0-beta.41

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
@@ -202203,8 +202203,19 @@ ${stubs}
202203
202203
  return { dynamicRegex, fromRegex, lookup, sideEffectRegex };
202204
202204
  }, rewriteImports2 = (code, filePath, projectRoot, rewriter) => {
202205
202205
  let result = code;
202206
- const bareSpecifierRe = /((?:from|import)\s*["'])([^"'./][^"']*)(["'])/g;
202207
- result = result.replace(bareSpecifierRe, (_match, prefix, specifier, suffix) => {
202206
+ result = result.replace(/^(import\s+.+?\s+from\s*["'])([^"'./][^"']*)(["'])/gm, (_match, prefix, specifier, suffix) => {
202207
+ const webPath = rewriter?.lookup.get(specifier);
202208
+ if (webPath)
202209
+ return `${prefix}${webPath}${suffix}`;
202210
+ return `${prefix}/@stub/${encodeURIComponent(specifier)}${suffix}`;
202211
+ });
202212
+ result = result.replace(/^(import\s*["'])([^"'./][^"']*)(["'])/gm, (_match, prefix, specifier, suffix) => {
202213
+ const webPath = rewriter?.lookup.get(specifier);
202214
+ if (webPath)
202215
+ return `${prefix}${webPath}${suffix}`;
202216
+ return `${prefix}/@stub/${encodeURIComponent(specifier)}${suffix}`;
202217
+ });
202218
+ result = result.replace(/^(export\s+.+?\s+from\s*["'])([^"'./][^"']*)(["'])/gm, (_match, prefix, specifier, suffix) => {
202208
202219
  const webPath = rewriter?.lookup.get(specifier);
202209
202220
  if (webPath)
202210
202221
  return `${prefix}${webPath}${suffix}`;
@@ -204216,5 +204227,5 @@ export {
204216
204227
  build
204217
204228
  };
204218
204229
 
204219
- //# debugId=0F1F3A52AED0B75D64756E2164756E21
204230
+ //# debugId=8043AA6879663C2A64756E2164756E21
204220
204231
  //# sourceMappingURL=build.js.map