@runner-ai/vite-uuid-tagger 0.0.2 → 0.0.4

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/dist/index.js +8 -1
  2. package/package.json +4 -2
package/dist/index.js CHANGED
@@ -56,8 +56,15 @@ function wrapRef(originalRef, sourceInfo) {
56
56
  };
57
57
  }
58
58
 
59
+ var VOID_ELEMENTS = new Set([
60
+ 'area','base','br','col','embed','hr','img','input',
61
+ 'link','meta','param','source','track','wbr'
62
+ ]);
63
+
64
+ var _isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';
65
+
59
66
  export function jsxDEV(type, props, key, isStaticChildren, source, self) {
60
- if (source && source.fileName && typeof type === 'string') {
67
+ if (_isBrowser && source && source.fileName && typeof type === 'string' && !VOID_ELEMENTS.has(type)) {
61
68
  var cleanFileName = getCleanFileName(source.fileName);
62
69
  var sourceInfo = {
63
70
  fileName: cleanFileName,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runner-ai/vite-uuid-tagger",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -8,7 +8,9 @@
8
8
  "import": "./dist/index.js"
9
9
  }
10
10
  },
11
- "files": ["dist"],
11
+ "files": [
12
+ "dist"
13
+ ],
12
14
  "scripts": {
13
15
  "build": "tsup",
14
16
  "test": "vitest run",