Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Babel 7 #30

Closed
stevenxxiu opened this issue Jan 15, 2018 · 4 comments
Closed

Babel 7 #30

stevenxxiu opened this issue Jan 15, 2018 · 4 comments
Milestone

Comments

@stevenxxiu
Copy link

stevenxxiu commented Jan 15, 2018

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.

@ForbesLindesay
Copy link
Member

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.

@ezhlobo
Copy link
Member

ezhlobo commented Sep 3, 2018

I've not met any issue with babel 7 on my projects. In case you have something which blocks you, share with us please.

@jasperandrew
Copy link

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.

@ezhlobo ezhlobo added this to the Version 7 milestone Dec 9, 2018
@ezhlobo ezhlobo mentioned this issue Dec 19, 2018
2 tasks
ezhlobo added a commit that referenced this issue Jan 6, 2019
We finally start supporting babel v7. As expected, it took more effort than just changing the number in package.json.

Among babel I updated other dependencies (apart from lint-staged, because in their changelog I saw they require Node >8.6, which I decided to fix within other PR).

Initial request: #30 

### Todo

- [x] Use new interface of @babel/cli (now we copy unwanted files)
- [x] Make sure tests for built version are passes
@ezhlobo
Copy link
Member

ezhlobo commented Jan 8, 2019

@shirohana @stevenxxiu @jasperandrew we now officially support babel@7 starting from 7.0.0 version of this plugin.

@ezhlobo ezhlobo closed this as completed Jan 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants