Closed stevenxxiu closed 5 years ago
If the babel team publish a guide for plugin authors to migrate, we can add support for babel 7. Failing that, once babel 7 is fully released, we could upgrade this library to babel 7 as a breaking change. At the moment, we still need to support babel 6.
I've not met any issue with babel 7 on my projects. In case you have something which blocks you, share with us please.
I'm getting this message:
{ Error: Cannot find module 'babel-core'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/mnt/c/Users/Jasper/Github/billy/node_modules/babel-plugin-transform-react-pug/lib/utils/parse.js:8:18)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3) code: 'MODULE_NOT_FOUND' }
It looks to me like this is an issue with the new naming conventions of Babel 7, as stated above. Probably changing babel-core
to @babel/core
would fix it.
@shirohana @stevenxxiu @jasperandrew we now officially support babel@7 starting from 7.0.0 version of this plugin.
Babel 7 uses
require('@babel/core');
now, substituting that in the source appears to work.A temporary fix now is to install
babel-core^7.0.0-bridge.0
.