Skip to content
New issue

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

getBabelLoader().options is undefined when you fix babel-loader #341

Open
bestycw opened this issue Jul 27, 2023 · 0 comments
Open

getBabelLoader().options is undefined when you fix babel-loader #341

bestycw opened this issue Jul 27, 2023 · 0 comments

Comments

@bestycw
Copy link

bestycw commented Jul 27, 2023

Because ths history reason, i cant eject react project.so i have to fix react-scritpts to match my project.
But when i change webpack.config.js :
{
test: /.(js|mjs|jsx|ts|tsx)$/,
include: paths.appSrc,
// loader: require.resolve('babel-loader'),
//options:{...}
use:[
{other loader},
{babel-loader}
]
}
It will throw error:
TypeError: Cannot read properties of undefined (reading 'options')

By reading the source code and identifying the problem, getBabelLoader did not consider the case where use is an array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant