We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ea45d4 commit 39ead3dCopy full SHA for 39ead3d
webpack.config.js
@@ -106,6 +106,19 @@ module.exports = (env) => {
106
// targets: "",
107
},
108
],
109
+ // The react preset includes plugins that are required for React
110
+ // apps. For example, it inclues a plugin that transforms JSX.
111
+ [
112
+ "@babel/preset-react",
113
+ {
114
+ // Tell "plugin-transform-react-jsx" which runtime to use.
115
+ // The "automatic" runtime will:
116
+ // * Import the jsx() function in your JSX files:
117
+ // `import { jsx as _jsx } from "react";`
118
+ // * Transform JSX: `<div />` to `_jsx("div")`
119
+ runtime: "automatic",
120
+ },
121
+ ],
122
123
124
0 commit comments