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.
第三方依赖包使用了最新的javascript语法,例如?. 代码构建的时候会报错,如何更新corejs版本,支持最新的js语法
+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'], }); }); };
研究了一下这样可以解决问题,看看你那适用不
Activity
Osub commentedon Jan 6, 2024
Dogtiti commentedon Feb 2, 2024
+1
Dogtiti commentedon Feb 2, 2024
@starsoul666
研究了一下这样可以解决问题,看看你那适用不