.babelrc使用中遇到的错误

Plugins

1、

ReferenceError: Unknown plugin "import" specified in "P:\iproduce\trunk\android-web\.babelrc" at 3, attempted to resolve relative to "P:\iproduce\trunk\android-web"

原因: 缺少插件babel-plugin-import
解决方案:

npm install babel-plugin-import --save-dev

yarn add babel-plugin-import --dev

参照:https://stackoverflow.com/questions/42731610/module-build-failed-referenceerror-unknown-plugin-import-specified-in-base

2、Module build failed: ReferenceError: Unknown plugin "component" specified in "/home/jenkins/workspace/test-xt-pl-user-web/.babelrc" at 2, attempted to resolve relative to "/home/jenkins/workspace/test-xt-pl-user-web"
原因:缺少插件babel-plugin-component
解决方案:

npm install babel-plugin-component --save-dev

你可能感兴趣的:(.babelrc使用中遇到的错误)