@navigate-ai/vite 0.1.40 → 0.1.42

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.
@@ -94,12 +94,16 @@ export function clippyVitePlugin(options) {
94
94
  return null;
95
95
  if (cleanId.includes('node_modules'))
96
96
  return null;
97
+ // Skip Vite virtual modules (prefixed with \0)
98
+ if (cleanId.includes('\0'))
99
+ return null;
97
100
  // Process file: extract metadata and inject IDs in one pass
98
101
  const result = processFile(source, cleanId);
99
102
  // Accumulate metadata for policy generation
100
103
  if (result.sourceFile) {
101
104
  // Memory optimization: clear source string, keep metadata
102
- result.sourceFile.source = '';
105
+ // Set to undefined (not '') so getAst() falls back to fs.readFileSync
106
+ result.sourceFile.source = undefined;
103
107
  accumulatedFiles.set(cleanId, result.sourceFile);
104
108
  }
105
109
  // Return modified source if IDs were injected
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navigate-ai/vite",
3
- "version": "0.1.40",
3
+ "version": "0.1.42",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -18,7 +18,7 @@
18
18
  }
19
19
  },
20
20
  "dependencies": {
21
- "@navigate_ai/plugin-shared": "^0.1.36"
21
+ "@navigate_ai/plugin-shared": "^0.1.38"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "@babel/parser": "^7.0.0",