因为一些原因 两个项目 不能更改为统一的版本。
我在 babel7的 项目中
"babel src -d lib "
这样进行编译, 并在 babel6的项目中引入,之后使用webpack打包 ,但是 会提示
Requires Babel "^7.0.0-0", but was loaded with "6.26.3". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention "@babel/core"
or "babel-core" to see what is calling Babel.
能够让babel7的项目编译出 babel6项目可以使用的js吗?
如果是已经用babel编译的模块,可以直接在项目中引入,无需再做一次babel编译,可以将此目录加到babel6项目中的过滤配置里