We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yarn add esbuild-loader --dev
// 移除已有的使用 `babel-loader` 的规则 config.module.rule("js").uses.clear(); config.module.rule("ts").uses.clear(); config.module.rule("tsx").uses.clear(); // 注入使用 `esbuild-loader` 的新规则 config.module.rule("js") .test(/\.m?jsx?$/) .use("esbuild-loader") .loader("esbuild-loader") .options({ // 只适用于 vue3 , vue2 没有暴露 h jsxFactory: "h", jsxFragment: "Fragment", // vue 2 // jsx: "automatic", // 安装 @lancercomet/vue2-jsx-runtime https://github.com/LancerComet/vue2-jsx-runtime // jsxImportSource: "@lancercomet/vue2-jsx-runtime" loader: "jsx", target: "es2015" }) .end(); config.module.rule("ts") .test(/\.ts$/) .use("esbuild-loader") .loader("esbuild-loader") .options({ loader: "ts", target: "es2015" }) .end(); config.module.rule("tsx") .test(/\.tsx$/) .use("esbuild-loader") .loader("esbuild-loader") .options({ loader: "tsx", target: "es2015" }) .end();
The text was updated successfully, but these errors were encountered:
No branches or pull requests
替换后会出现的问题
The text was updated successfully, but these errors were encountered: