How can I use Vue + Vite + JSX to package a tree-shaking esm bundle

Viewed 9

When I using *.vue sfc file to make a bundle. I can get a function with /* @__PURE__ */

const z = /* @__PURE__ */ p({
  props: {
    a: String
  },
  setup(n) {
    const t = n, o = c("apple");
    return (r, l) => (b(), h("div", null, "I'm " + s(o.value) + " " + s(t.a), 1));
  }
});

But when I using vue-jsx, it without /* @__PURE__ */ flag

const C = p({
  name: "MyComponent",
  setup() {
    return () => f("div", null, [i("I'm KK")]);
  }
});

How can I get /* @__PURE__ */ flag with vue-jsx

0 Answers
Related