veslx 0.1.17 → 0.1.19
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/package.json +4 -2
- package/vite.config.ts +10 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "veslx",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"dev": "VESLX_DEV=1 bun bin/veslx.ts serve content",
|
|
27
27
|
"build": "bun bin/veslx.ts build content",
|
|
28
28
|
"build:lib": "vite build --config vite.lib.config.ts",
|
|
29
|
-
"prepublishOnly": "npm run build:lib"
|
|
29
|
+
"prepublishOnly": "npm run build:lib",
|
|
30
|
+
"test": "bun test"
|
|
30
31
|
},
|
|
31
32
|
"dependencies": {
|
|
32
33
|
"@icons-pack/react-simple-icons": "^13.8.0",
|
|
@@ -103,6 +104,7 @@
|
|
|
103
104
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
104
105
|
"eslint-plugin-react-refresh": "^0.4.24",
|
|
105
106
|
"globals": "^16.5.0",
|
|
107
|
+
"playwright": "^1.57.0",
|
|
106
108
|
"typescript": "~5.9.3",
|
|
107
109
|
"typescript-eslint": "^8.46.3",
|
|
108
110
|
"vite-plugin-dts": "^4.5.4"
|
package/vite.config.ts
CHANGED
|
@@ -37,12 +37,17 @@ function reactResolverPlugin(): Plugin {
|
|
|
37
37
|
|
|
38
38
|
return {
|
|
39
39
|
name: 'veslx-react-resolver',
|
|
40
|
-
|
|
41
|
-
resolveId(id) {
|
|
42
|
-
if (resolved.has(id))
|
|
43
|
-
|
|
40
|
+
// Only resolve for user content MDX files (outside veslx's own src)
|
|
41
|
+
async resolveId(id, importer, options) {
|
|
42
|
+
if (!resolved.has(id)) return null
|
|
43
|
+
// Only intercept if importer is outside veslx (user content)
|
|
44
|
+
if (!importer || importer.includes('/veslx/') || importer.includes('node_modules')) {
|
|
45
|
+
return null
|
|
44
46
|
}
|
|
45
|
-
|
|
47
|
+
// Let Vite try first, only fallback to our resolution
|
|
48
|
+
const resolution = await this.resolve(id, importer, { ...options, skipSelf: true })
|
|
49
|
+
if (resolution) return null
|
|
50
|
+
return resolved.get(id)
|
|
46
51
|
},
|
|
47
52
|
}
|
|
48
53
|
}
|