veslx 0.1.17 → 0.1.18

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  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.17",
3
+ "version": "0.1.18",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
package/vite.config.ts CHANGED
@@ -37,12 +37,17 @@ function reactResolverPlugin(): Plugin {
37
37
 
38
38
  return {
39
39
  name: 'veslx-react-resolver',
40
- enforce: 'pre',
41
- resolveId(id) {
42
- if (resolved.has(id)) {
43
- return resolved.get(id)
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
- return null
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
  }