@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/build.js CHANGED
@@ -10095,13 +10095,17 @@ var resolveDevClientDir3 = () => {
10095
10095
  return "template-only";
10096
10096
  }
10097
10097
  return "full";
10098
- }, 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) => {
10098
+ }, 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) => {
10099
10099
  if (filePath.endsWith(".vue"))
10100
10100
  return filePath.replace(/\.vue$/, ".js");
10101
10101
  if (filePath.endsWith(".ts"))
10102
10102
  return filePath.replace(/\.ts$/, ".js");
10103
- if (isStylePath(filePath))
10103
+ if (isStylePath(filePath)) {
10104
+ if (sourceDir && (filePath.startsWith("./") || filePath.startsWith("../"))) {
10105
+ return resolve15(sourceDir, filePath);
10106
+ }
10104
10107
  return filePath;
10108
+ }
10105
10109
  return `${filePath}.js`;
10106
10110
  }, stripExports = (code) => code.replace(/export\s+default/, "const script =").replace(/^export\s+/gm, ""), mergeVueImports = (code) => {
10107
10111
  const lines = code.split(`
@@ -10167,7 +10171,8 @@ var resolveDevClientDir3 = () => {
10167
10171
  inlineTemplate: false
10168
10172
  }) : { bindings: {}, content: "export default {};" };
10169
10173
  const strippedScript = stripExports(compiledScript.content);
10170
- const transpiledScript = transpiler3.transformSync(strippedScript).replace(/(['"])(\.{1,2}\/[^'"]+)(['"])/g, (_2, quoteStart, relativeImport, quoteEnd) => `${quoteStart}${toJs(relativeImport)}${quoteEnd}`);
10174
+ const sourceDir = dirname10(sourceFilePath);
10175
+ const transpiledScript = transpiler3.transformSync(strippedScript).replace(/(['"])(\.{1,2}\/[^'"]+)(['"])/g, (_2, quoteStart, relativeImport, quoteEnd) => `${quoteStart}${toJs(relativeImport, sourceDir)}${quoteEnd}`);
10171
10176
  const packageImportRewrites = new Map;
10172
10177
  for (const [bareImport, absolutePath] of packageComponentPaths) {
10173
10178
  const childResult = cacheMap.get(absolutePath);
@@ -10189,7 +10194,7 @@ var resolveDevClientDir3 = () => {
10189
10194
  source: descriptor.template?.content ?? "",
10190
10195
  ssr,
10191
10196
  ssrCssVars: descriptor.cssVars
10192
- }).code.replace(/(['"])(\.{1,2}\/[^'"]+)(['"])/g, (_2, quoteStart, relativeImport, quoteEnd) => `${quoteStart}${toJs(relativeImport)}${quoteEnd}`);
10197
+ }).code.replace(/(['"])(\.{1,2}\/[^'"]+)(['"])/g, (_2, quoteStart, relativeImport, quoteEnd) => `${quoteStart}${toJs(relativeImport, sourceDir)}${quoteEnd}`);
10193
10198
  const localCss = await Promise.all(descriptor.styles.map(async (styleBlock) => compiler.compileStyle({
10194
10199
  filename: sourceFilePath,
10195
10200
  id: componentId,
@@ -17901,5 +17906,5 @@ export {
17901
17906
  build
17902
17907
  };
17903
17908
 
17904
- //# debugId=529908DC5C87E9F364756E2164756E21
17909
+ //# debugId=3AAA82D7EC0F5B9564756E2164756E21
17905
17910
  //# sourceMappingURL=build.js.map