Uncaught Error: Module build failed: Error: Couldn't find preset "@babel/env" relative to directory "D:\\pos\\src\\angular\\common\\util\\pinyin"
at D:\pos\node_modules\babel-core\lib\transformation\file\options\option-manager.js:293:19
at Array.map (<anonymous>)
at OptionManager.resolvePresets (D:\pos\node_modules\babel-core\lib\transformation\file\options\option-manager.js:275:20)
at OptionManager.mergePresets (D:\pos\node_modules\babel-core\lib\transformation\file\options\option-manager.js:264:10)
at OptionManager.mergeOptions (D:\pos\node_modules\babel-core\lib\transformation\file\options\option-manager.js:249:14)
at OptionManager.init (D:\pos\node_modules\babel-core\lib\transformation\file\options\option-manager.js:368:12)
webpack.config.js
{
test: /\.js$/,
exclude: /(node_modules|output)/,
loader: 'babel-loader', // 'babel-loader' is also a legal name to reference
'query': {
'plugins': ['lodash'],
// 'presets': [['@babel/env', { 'targets': { 'node': 6 } }]]
'presets': ['@babel/env']
}
}
After used babel-plugin-lodash,i get below error
webpack.config.js