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

[WIP] Update to Babel 7 #15

Closed
wants to merge 1 commit into from
Closed

[WIP] Update to Babel 7 #15

wants to merge 1 commit into from

Conversation

biilmann
Copy link
Member

This updates to Babel 7 and webpack 4

@leonardodino
Copy link
Contributor

leonardodino commented Mar 27, 2018

based on this pool maybe we must update to @babe/core and other scoped packages?

it's seems to be the way forward on Babel 7. I even have to install it as a peer dependency, right now.


dependency error using [email protected] & [email protected].

expand log
Building functions
Hash: f1fb444fa034b7754791
Version: webpack 4.2.0
Time: 223ms
Built at: 2018-3-27 01:54:33
   Asset      Size  Chunks  Chunk Names
index.js  1.53 KiB       0  index
Entrypoint index = index.js
   [0] ./index.js 959 bytes {0} [built] [failed] [1 error]

ERROR in ./index.js
Module build failed: Error: Cannot find module '@babel/core'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (./node_modules/babel-loader/lib/transform.js:1:75)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (./node_modules/babel-loader/lib/cache.js:24:17)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)

after yarn add @babel/core problem goes away.

@Saeris
Copy link

Saeris commented Mar 27, 2018

Yes, you need to use the scoped packages.

Also, you can pass on individually including the following:

  • transform-class-properties
  • transform-object-assign
  • transform-object-rest-spread

And instead go with

  • @babel/preset-stage-3

Which includes class properties and rest-spread. Object-assign is included in preset-env.

Although personally I would go with stage-0, which includes all of the different proposal stages, which covers a wide range of use-cases. Just my two cents.

@leonardodino
Copy link
Contributor

I would advise against using an experimental stage, especially for this kind of stuff. better to have resilient, and documented, standards, users can bypass it via .babelrc anyways.

@Saeris
Copy link

Saeris commented Mar 27, 2018

Well if you want to do things that way, you will have to include the following deps:

@babel/plugin-proposal-object-rest-spread
@babel/plugin-proposal-class-properties
@babel/plugin-transform-object-assign

@swyxio
Copy link
Contributor

swyxio commented Oct 11, 2018

Hi all, we've upgraded to babel 7 officially! thank you for all your patience.

@swyxio swyxio closed this Oct 11, 2018
@erezrokah erezrokah deleted the babel-7 branch January 14, 2021 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants