what-compiler 0.6.1 → 0.6.2
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/dist/babel-plugin.js +3 -0
- package/dist/babel-plugin.js.map +2 -2
- package/dist/babel-plugin.min.js +1 -1
- package/dist/babel-plugin.min.js.map +2 -2
- package/dist/index.js +3 -0
- package/dist/index.js.map +2 -2
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +2 -2
- package/dist/vite-plugin.js +3 -0
- package/dist/vite-plugin.js.map +2 -2
- package/dist/vite-plugin.min.js +3 -3
- package/dist/vite-plugin.min.js.map +2 -2
- package/package.json +1 -1
- package/src/babel-plugin.js +7 -0
package/dist/vite-plugin.js
CHANGED
|
@@ -348,6 +348,7 @@ function whatBabelPlugin({ types: t }) {
|
|
|
348
348
|
for (const attr of el.attributes) {
|
|
349
349
|
if (t.isJSXSpreadAttribute(attr)) continue;
|
|
350
350
|
const name = getAttrName(attr);
|
|
351
|
+
if (name === "key") continue;
|
|
351
352
|
if (name.startsWith("on") || name.startsWith("bind:") || name.includes("|")) continue;
|
|
352
353
|
let domName = name;
|
|
353
354
|
if (name === "className") domName = "class";
|
|
@@ -507,6 +508,7 @@ function whatBabelPlugin({ types: t }) {
|
|
|
507
508
|
continue;
|
|
508
509
|
}
|
|
509
510
|
const attrName = getAttrName(attr);
|
|
511
|
+
if (attrName === "key") continue;
|
|
510
512
|
if (attrName === "ref") {
|
|
511
513
|
const refExpr = getAttributeValue(attr.value);
|
|
512
514
|
statements.push(
|
|
@@ -903,6 +905,7 @@ function whatBabelPlugin({ types: t }) {
|
|
|
903
905
|
continue;
|
|
904
906
|
}
|
|
905
907
|
const attrName = getAttrName(attr);
|
|
908
|
+
if (attrName === "key") continue;
|
|
906
909
|
if (isBindingAttribute(attrName)) {
|
|
907
910
|
const bindProp = getBindingProperty(attrName);
|
|
908
911
|
const signalExpr = attr.value.expression;
|