@stacksjs/stx 0.2.132 → 0.2.133
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/cli.js +468 -468
- package/dist/craft.js +220 -220
- package/dist/process.js +3 -1
- package/dist/pwa.js +265 -265
- package/dist/ssg.js +217 -217
- package/dist/style-scoping.d.ts +9 -0
- package/dist/style-scoping.js +10 -0
- package/package.json +5 -5
package/dist/process.js
CHANGED
|
@@ -35,7 +35,7 @@ import { runComposers } from "./view-composers.js";
|
|
|
35
35
|
import { processServerBindings } from "./server-bindings.js";
|
|
36
36
|
import { processVueTemplate } from "./vue-template.js";
|
|
37
37
|
import { processDynamicComponents } from "./dynamic-components.js";
|
|
38
|
-
import { processScopedStyles } from "./style-scoping.js";
|
|
38
|
+
import { dedupeScopedStyles, processScopedStyles } from "./style-scoping.js";
|
|
39
39
|
import { ensureDocumentShell, hasDocumentShell, injectCloakStyle, injectConfigHeadTags } from "./document-shell.js";
|
|
40
40
|
import { hasSignalsSyntax, convertSignalDirectivesToAttributes, convertSignalLoopsToAttributes, preEvalLiteralReactiveIfs, processSignals } from "./signal-processing.js";
|
|
41
41
|
import { processComponents } from "./component-renderer.js";
|
|
@@ -317,6 +317,8 @@ export async function processDirectives(template, context, filePath, options, de
|
|
|
317
317
|
} catch {}
|
|
318
318
|
if (isTopLevel && context.__stx_inject_css !== !1)
|
|
319
319
|
result = await injectCrosswindCSS(result);
|
|
320
|
+
if (isTopLevel)
|
|
321
|
+
result = dedupeScopedStyles(result);
|
|
320
322
|
result = result.replace(/\x00STX_ESCAPED_AT\x00/g, "@");
|
|
321
323
|
return result;
|
|
322
324
|
});
|