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

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/index.js CHANGED
@@ -202253,24 +202253,16 @@ ${stubs}
202253
202253
  return { dynamicRegex, fromRegex, lookup, sideEffectRegex };
202254
202254
  }, rewriteImports2 = (code, filePath, projectRoot, rewriter) => {
202255
202255
  let result = code;
202256
- result = result.replace(/^(import\s+.+?\s+from\s*["'])([^"'./][^"']*)(["'])/gm, (_match, prefix, specifier, suffix) => {
202256
+ const rewriteBare = (_match, prefix, specifier, suffix) => {
202257
202257
  const webPath = rewriter?.lookup.get(specifier);
202258
202258
  if (webPath)
202259
202259
  return `${prefix}${webPath}${suffix}`;
202260
202260
  return `${prefix}/@stub/${encodeURIComponent(specifier)}${suffix}`;
202261
- });
202262
- result = result.replace(/^(import\s*["'])([^"'./][^"']*)(["'])/gm, (_match, prefix, specifier, suffix) => {
202263
- const webPath = rewriter?.lookup.get(specifier);
202264
- if (webPath)
202265
- return `${prefix}${webPath}${suffix}`;
202266
- return `${prefix}/@stub/${encodeURIComponent(specifier)}${suffix}`;
202267
- });
202268
- result = result.replace(/^(export\s+.+?\s+from\s*["'])([^"'./][^"']*)(["'])/gm, (_match, prefix, specifier, suffix) => {
202269
- const webPath = rewriter?.lookup.get(specifier);
202270
- if (webPath)
202271
- return `${prefix}${webPath}${suffix}`;
202272
- return `${prefix}/@stub/${encodeURIComponent(specifier)}${suffix}`;
202273
- });
202261
+ };
202262
+ result = result.replace(/^(import\s+.+?\s+from\s*["'])([^"'./][^"']*)(["'])/gm, rewriteBare);
202263
+ result = result.replace(/^(import\s*["'])([^"'./][^"']*)(["'])/gm, rewriteBare);
202264
+ result = result.replace(/^(export\s+.+?\s+from\s*["'])([^"'./][^"']*)(["'])/gm, rewriteBare);
202265
+ result = result.replace(/(import\s*\(\s*["'])([^"'./][^"']*)(["']\s*\))/g, rewriteBare);
202274
202266
  const fileDir = dirname7(filePath);
202275
202267
  result = result.replace(/(from\s*["'])(\.\.?\/[^"']+)(["'])/g, (_match, prefix, relPath, suffix) => {
202276
202268
  const absPath = resolve18(fileDir, relPath);
@@ -204675,5 +204667,5 @@ export {
204675
204667
  ANGULAR_INIT_TIMEOUT_MS
204676
204668
  };
204677
204669
 
204678
- //# debugId=2350BCD37BC3493864756E2164756E21
204670
+ //# debugId=704DE73AA3BFEB6C64756E2164756E21
204679
204671
  //# sourceMappingURL=index.js.map