vite-plugin-vanjs 0.0.8 → 0.0.9

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/README.md CHANGED
@@ -20,6 +20,9 @@ A mini meta-framework for [VanJS](https://vanjs.org/) developed around the aweso
20
20
 
21
21
  The plugin will automatically load the appropriate Van or VanX objects depending on the client/server environment with zero configuration needed. It uses the `mini-van-plate/shared` module to register the required objects in an isomorphic enviroment.
22
22
 
23
+ Also in _development_ mode, the plugin will load the `van.debug.js` module to help you better troubleshoot your VanJS application.
24
+
25
+
23
26
  ### Notes
24
27
  * The plugin uses `van-ext` along with `mini-van-plate` so you can have everything ready from the start.
25
28
 
package/jsx/jsx.mjs CHANGED
@@ -2,7 +2,12 @@ import van from "../setup/van.mjs";
2
2
  import setup from "../setup/index.mjs";
3
3
  import { setAttribute, styleToString } from "../client/index.mjs";
4
4
 
5
- export const jsx = (jsxTag, { children, ref, style, ...props }) => {
5
+ export const jsx = (jsxTag, { children, ref, style, ...rest }) => {
6
+ // filter props with undefined values
7
+ const props = Object.fromEntries(
8
+ Object.entries(rest).filter(([_, val]) => val !== undefined),
9
+ );
10
+
6
11
  if (typeof jsxTag === "string") {
7
12
  const newElement = van.tags[jsxTag](props, children);
8
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-vanjs",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "author": "thednp",
5
5
  "license": "MIT",
6
6
  "description": "A mini meta-framework for VanJS powered by Vite",