@absolutejs/absolute 0.19.0-beta.994 → 0.19.0-beta.995
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
|
@@ -13251,7 +13251,24 @@ var resolveDevClientDir3 = () => {
|
|
|
13251
13251
|
return "template-only";
|
|
13252
13252
|
}
|
|
13253
13253
|
return "full";
|
|
13254
|
-
}, generateVueHmrId = (sourceFilePath, vueRootDir) => relative10(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),
|
|
13254
|
+
}, generateVueHmrId = (sourceFilePath, vueRootDir) => relative10(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), hoistCssImports = (css) => {
|
|
13255
|
+
const importRegex = /@import\s+[^;]+;\s*\n?/g;
|
|
13256
|
+
const imports = [];
|
|
13257
|
+
const seen = new Set;
|
|
13258
|
+
const stripped = css.replace(importRegex, (match) => {
|
|
13259
|
+
const normalised = match.trim();
|
|
13260
|
+
if (seen.has(normalised))
|
|
13261
|
+
return "";
|
|
13262
|
+
seen.add(normalised);
|
|
13263
|
+
imports.push(normalised);
|
|
13264
|
+
return "";
|
|
13265
|
+
});
|
|
13266
|
+
if (imports.length === 0)
|
|
13267
|
+
return css;
|
|
13268
|
+
return `${imports.join(`
|
|
13269
|
+
`)}
|
|
13270
|
+
${stripped}`;
|
|
13271
|
+
}, resolveHelperTsPath = (sourceDir, helper) => {
|
|
13255
13272
|
if (helper.endsWith(".ts"))
|
|
13256
13273
|
return resolve23(sourceDir, helper);
|
|
13257
13274
|
const direct = resolve23(sourceDir, `${helper}.ts`);
|
|
@@ -13404,8 +13421,8 @@ var resolveDevClientDir3 = () => {
|
|
|
13404
13421
|
if (isEntryPoint && allCss.length) {
|
|
13405
13422
|
const cssOutputFile = join28(outputDirs.css, `${toKebab(fileBaseName)}-compiled.css`);
|
|
13406
13423
|
await mkdir5(dirname15(cssOutputFile), { recursive: true });
|
|
13407
|
-
await write3(cssOutputFile, allCss.join(`
|
|
13408
|
-
`));
|
|
13424
|
+
await write3(cssOutputFile, hoistCssImports(allCss.join(`
|
|
13425
|
+
`)));
|
|
13409
13426
|
cssOutputPaths = [cssOutputFile];
|
|
13410
13427
|
}
|
|
13411
13428
|
const assembleModule = (renderCode, renderFnName, includeHmr) => {
|
|
@@ -35681,5 +35698,5 @@ export {
|
|
|
35681
35698
|
ANGULAR_INIT_TIMEOUT_MS
|
|
35682
35699
|
};
|
|
35683
35700
|
|
|
35684
|
-
//# debugId=
|
|
35701
|
+
//# debugId=66735B5F990E713564756E2164756E21
|
|
35685
35702
|
//# sourceMappingURL=index.js.map
|