I have a node.js backend project, and I use webpack
to build it.
"webpack": "^4.46.0",
"webpack-cli": "^4.4.0"
it reports error like
Module build failed (from ./node_modules/babel-loader/lib/index.js):
TypeError: this.getOptions is not a function
Then I read the source code of /node_modules/babel-loader/lib/index.js
to figure out why.
As you can see in the screenshot, there's only one search result of this.getOptions()
in the node_modules/babel-loader/lib/index.js
file. No definition of the function and it just be used. It's supposed to be a bug, at least it looks like that.
Why does the babel team
write souce code like that? And why do all others think it's a version conflict but not a code bug itself?