gonia 0.2.3 → 0.2.5
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/server/render.js +2 -1
- package/dist/vite/plugin.js +3 -1
- package/package.json +1 -1
package/dist/server/render.js
CHANGED
|
@@ -11,6 +11,7 @@ import { registerProvider, resolveFromProviders, resolveFromDIProviders } from '
|
|
|
11
11
|
import { createElementScope, getElementScope } from '../scope.js';
|
|
12
12
|
import { FOR_PROCESSED_ATTR, FOR_TEMPLATE_ATTR } from '../directives/for.js';
|
|
13
13
|
import { IF_PROCESSED_ATTR } from '../directives/if.js';
|
|
14
|
+
import { PROCESSED_ATTR } from '../process.js';
|
|
14
15
|
import { resolveDependencies as resolveInjectables } from '../inject.js';
|
|
15
16
|
import { resolveContext } from '../context-registry.js';
|
|
16
17
|
/**
|
|
@@ -257,7 +258,7 @@ export async function render(html, state, registry) {
|
|
|
257
258
|
}
|
|
258
259
|
// Skip elements already processed by structural directives (g-for, g-if)
|
|
259
260
|
// These elements have their own scoped processing
|
|
260
|
-
if (el.hasAttribute(FOR_PROCESSED_ATTR) || el.hasAttribute(IF_PROCESSED_ATTR)) {
|
|
261
|
+
if (el.hasAttribute(FOR_PROCESSED_ATTR) || el.hasAttribute(IF_PROCESSED_ATTR) || el.hasAttribute(PROCESSED_ATTR)) {
|
|
261
262
|
processed.add(el);
|
|
262
263
|
continue;
|
|
263
264
|
}
|
package/dist/vite/plugin.js
CHANGED
|
@@ -351,7 +351,9 @@ export function gonia(options = {}) {
|
|
|
351
351
|
detected.delete(name);
|
|
352
352
|
}
|
|
353
353
|
// Generate imports if we found directives and haven't already
|
|
354
|
-
|
|
354
|
+
// Skip HTML files - they're scanned for detection but imports go in JS
|
|
355
|
+
const isHtmlFile = /\.html$/.test(id);
|
|
356
|
+
if (detected.size > 0 && !injectedModules.has(id) && !isHtmlFile) {
|
|
355
357
|
// Check if this file already imports from gonia/directives
|
|
356
358
|
const hasGoniaImport = code.includes("from 'gonia/directives'") ||
|
|
357
359
|
code.includes('from "gonia/directives"');
|