@absolutejs/absolute 0.19.0-beta.781 → 0.19.0-beta.782

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
@@ -10287,13 +10287,17 @@ var resolveDevClientDir3 = () => {
10287
10287
  return "template-only";
10288
10288
  }
10289
10289
  return "full";
10290
- }, generateVueHmrId = (sourceFilePath, vueRootDir) => relative8(vueRootDir, sourceFilePath).replace(/\\/g, "/").replace(/\.vue$/, ""), extractImports = (sourceCode) => Array.from(sourceCode.matchAll(/import\s+[\s\S]+?['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((importPath) => importPath !== undefined), toJs = (filePath) => {
10290
+ }, generateVueHmrId = (sourceFilePath, vueRootDir) => relative8(vueRootDir, sourceFilePath).replace(/\\/g, "/").replace(/\.vue$/, ""), extractImports = (sourceCode) => Array.from(sourceCode.matchAll(/import\s+[\s\S]+?['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((importPath) => importPath !== undefined), toJs = (filePath, sourceDir) => {
10291
10291
  if (filePath.endsWith(".vue"))
10292
10292
  return filePath.replace(/\.vue$/, ".js");
10293
10293
  if (filePath.endsWith(".ts"))
10294
10294
  return filePath.replace(/\.ts$/, ".js");
10295
- if (isStylePath(filePath))
10295
+ if (isStylePath(filePath)) {
10296
+ if (sourceDir && (filePath.startsWith("./") || filePath.startsWith("../"))) {
10297
+ return resolve18(sourceDir, filePath);
10298
+ }
10296
10299
  return filePath;
10300
+ }
10297
10301
  return `${filePath}.js`;
10298
10302
  }, stripExports = (code) => code.replace(/export\s+default/, "const script =").replace(/^export\s+/gm, ""), mergeVueImports = (code) => {
10299
10303
  const lines = code.split(`
@@ -10359,7 +10363,8 @@ var resolveDevClientDir3 = () => {
10359
10363
  inlineTemplate: false
10360
10364
  }) : { bindings: {}, content: "export default {};" };
10361
10365
  const strippedScript = stripExports(compiledScript.content);
10362
- const transpiledScript = transpiler3.transformSync(strippedScript).replace(/(['"])(\.{1,2}\/[^'"]+)(['"])/g, (_2, quoteStart, relativeImport, quoteEnd) => `${quoteStart}${toJs(relativeImport)}${quoteEnd}`);
10366
+ const sourceDir = dirname11(sourceFilePath);
10367
+ const transpiledScript = transpiler3.transformSync(strippedScript).replace(/(['"])(\.{1,2}\/[^'"]+)(['"])/g, (_2, quoteStart, relativeImport, quoteEnd) => `${quoteStart}${toJs(relativeImport, sourceDir)}${quoteEnd}`);
10363
10368
  const packageImportRewrites = new Map;
10364
10369
  for (const [bareImport, absolutePath] of packageComponentPaths) {
10365
10370
  const childResult = cacheMap.get(absolutePath);
@@ -10381,7 +10386,7 @@ var resolveDevClientDir3 = () => {
10381
10386
  source: descriptor.template?.content ?? "",
10382
10387
  ssr,
10383
10388
  ssrCssVars: descriptor.cssVars
10384
- }).code.replace(/(['"])(\.{1,2}\/[^'"]+)(['"])/g, (_2, quoteStart, relativeImport, quoteEnd) => `${quoteStart}${toJs(relativeImport)}${quoteEnd}`);
10389
+ }).code.replace(/(['"])(\.{1,2}\/[^'"]+)(['"])/g, (_2, quoteStart, relativeImport, quoteEnd) => `${quoteStart}${toJs(relativeImport, sourceDir)}${quoteEnd}`);
10385
10390
  const localCss = await Promise.all(descriptor.styles.map(async (styleBlock) => compiler.compileStyle({
10386
10391
  filename: sourceFilePath,
10387
10392
  id: componentId,
@@ -26405,5 +26410,5 @@ export {
26405
26410
  ANGULAR_INIT_TIMEOUT_MS
26406
26411
  };
26407
26412
 
26408
- //# debugId=8EDB0B5EB8B1561264756E2164756E21
26413
+ //# debugId=2FCAF657E39AC98C64756E2164756E21
26409
26414
  //# sourceMappingURL=index.js.map