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
第三方依赖包使用了最新的javascript语法,例如?. 代码构建的时候会报错,如何更新corejs版本,支持最新的js语法
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
+1
@starsoul666
module.exports = ({ onGetWebpackConfig }) => { onGetWebpackConfig((config) => { // 确保babel-loader配置存在,然后添加optional chaining插件 config.module .rule('js') .test(/\.jsx?$/) .use('babel-loader') .loader('babel-loader') .options({ presets: ['@babel/preset-env', '@babel/preset-react'], plugins: ['@babel/plugin-proposal-optional-chaining'], }); }); };
研究了一下这样可以解决问题,看看你那适用不
No branches or pull requests
第三方依赖包使用了最新的javascript语法,例如?. 代码构建的时候会报错,如何更新corejs版本,支持最新的js语法
The text was updated successfully, but these errors were encountered: