Closed Sanshain closed 2 months ago
Following trouble is possible in runtime:
Uncaught ReferenceError: h is not defined
h
import { h } from 'preact';
@babel/transform-react-jsx
automatic
[ "@babel/transform-react-jsx", { // "pragma": "h", // "pragmaFrag": "Fragment", "runtime": "automatic", "importSource": "preact" } ]
Attention: don't use pragma* options while use "runtime": "automatic". Because it may cause some troubles: pragma and pragmaFrag cannot be set when runtime is automatic
pragma*
"runtime": "automatic"
Following trouble is possible in runtime:
Solutions (to choose from):
h
imports to each jsx file like this:@babel/transform-react-jsx
plugin toautomatic
like this:Attention: don't use
pragma*
options while use"runtime": "automatic"
. Because it may cause some troubles: pragma and pragmaFrag cannot be set when runtime is automatic