I am facing an issue while using the babel-loader
. I have removed all irrelevant code and just kept the error-related portion. What could be causing this problem?
module.exports = merge(baseWebpackConfig, {
...
module: {
rules: [
{
test: /\.[jt]s$/,
use: [
'babel-loader'
],
exclude: /node_modules/
}
]
}
})
ERROR in ./src/index.ts
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] /Users/eterna/workspaces/experiments/neoteric/src/index.ts: Invalid Option: module is not a valid top-level option.
Maybe you meant to use 'modules'? (While processing: "/Users/eterna/workspaces/experiments/neoteric/node_modules/@babel/preset-env/lib/index.js")
...
at async.call.result.err.err (/Users/eterna/workspaces/experiments/neoteric/node_modules/gensync/index.js:216:11)
package.json
"babel-loader": "^8.1.0",
"@babel/preset-env": "^7.11.5",
"webpack": "^4.44.2",
"webpack-merge": "^5.1.4"