Использую данный конфиг, а babel ругается на использование одинаковых плагинов:
"presets": ["@babel/preset-env", "@babel/preset-react"],
"plugins": [
"@babel/plugin-transform-runtime",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-syntax-dynamic-import",
"@loadable/babel-plugin"
],
Текст ошибки:
npm WARN loadable-components@0.2.1 requires a peer of react@^15.0.0 but none is installed. You must install peer dependencies yourself.
audited 17975 packages in 14.846s
found 216 high severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
front-end@0.0.1 ssr:prod:main /usr/src/app
NODE_ICU_DATA=node_modules/full-icu BUILD_MODE=MAIN NODE_ENV=production babel-node index.js
/usr/src/app/node_modules/@babel/core/lib/config/config-descriptors.js:205
throw new Error([`Duplicate plugin/preset detected.`, `If you'd like to use two separate instances of a plugin,`, `they need separate names, e.g.`, ``, ` plugins: [`, ` ['some-plugin', {}],`, ` ['some-plugin', {}, 'some unique name'],`, ` ]`].join("\n"));
^
Error: Duplicate plugin/preset detected.
If you'd like to use two separate instances of a plugin,
they need separate names, e.g.
plugins: [
['some-plugin', {}],
['some-plugin', {}, 'some unique name'],
]
at assertNoDuplicates (/usr/src/app/node_modules/@babel/core/lib/config/config-descriptors.js:205:13)
at createDescriptors (/usr/src/app/node_modules/@babel/core/lib/config/config-descriptors.js:114:3)
at createPluginDescriptors (/usr/src/app/node_modules/@babel/core/lib/config/config-descriptors.js:105:10)
at plugins (/usr/src/app/node_modules/@babel/core/lib/config/config-descriptors.js:40:19)
at mergeChainOpts (/usr/src/app/node_modules/@babel/core/lib/config/config-chain.js:319:26)
at /usr/src/app/node_modules/@babel/core/lib/config/config-chain.js:283:7
at buildRootChain (/usr/src/app/node_modules/@babel/core/lib/config/config-chain.js:120:22)
at loadPrivatePartialConfig (/usr/src/app/node_modules/@babel/core/lib/config/partial.js:85:55)
at loadFullConfig (/usr/src/app/node_modules/@babel/core/lib/config/full.js:43:39)
at loadOptions (/usr/src/app/node_modules/@babel/core/lib/config/index.js:27:36)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! front-end@0.0.1 ssr:prod:main: `NODE_ICU_DATA=node_modules/full-icu BUILD_MODE=MAIN NODE_ENV=production babel-node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the front-end@0.0.1 ssr:prod:main script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.