* Fix `jsxDEV` for generated elements * Throw invariant error * Add test * test: revise test layout * fix: node 6 does not support trailing comma * Use undefined node Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
19 lines
389 B
JavaScript
19 lines
389 B
JavaScript
module.exports = function ({ types: t }) {
|
|
return {
|
|
visitor: {
|
|
Program: {
|
|
enter(path) {
|
|
path.pushContainer(
|
|
"body",
|
|
t.JSXElement(
|
|
t.JSXOpeningElement(t.JSXIdentifier("div"), [], false),
|
|
t.JSXClosingElement(t.JSXIdentifier("div")),
|
|
[]
|
|
)
|
|
);
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|