Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

RFC: switch to Babel #508

Closed
1 task done
layershifter opened this issue Nov 21, 2018 · 3 comments · Fixed by #1404
Closed
1 task done

RFC: switch to Babel #508

layershifter opened this issue Nov 21, 2018 · 3 comments · Fixed by #1404
Labels
vsts Paired with ticket in vsts
Projects

Comments

@layershifter
Copy link
Member

layershifter commented Nov 21, 2018

Previously we've decided to switch to Babel as compiler to improve our developer experience and get benefits from Babel's ecosystem like plugins. I've separated our switch to small steps that will allow us to make this process clearly.

1. Switch docs

I think that our main issue now is very slow work of yarn start i.e. start docs and we should solve this problem firstly.

Actions

  • compare the performance of babel-loader & fork-ts-checker-webpack-plugin VS awesome-typescript-loader with useBabel=true

awesome-typescript-loader doesn't work properly with Babel 7, consider use babel-loader because it faster. Requires changes in project structure as we can't use required -- -isolatedModules to work properly: babel/babel#8361

Goals

2. Switch to @babel/register

The second step is the replacement of ts-node with @babel/register this will improve performance of all our internal scripts.

3. Switch to gulp-babel

Replace gulp-typescript with gulp-babel or even with pika-pkg: #1169.

Use existing plugins

babel-plugin-lodash & babel-plugin-transform-react-remove-prop-types will allow us to reduce bundle size for consumers.

@pkumarie2011 pkumarie2011 added the vsts Paired with ticket in vsts label Nov 21, 2018
@alinais alinais added this to Priority in Core Team Nov 23, 2018
@layershifter
Copy link
Member Author

layershifter commented Jan 9, 2019

https://github.com/gaearon/react-hot-loader#typescript

As of version 4, React Hot Loader requires you to pass your code through Babel to transform it so that it can be hot-reloaded. This can be a pain point for TypeScript users, who usually do not need to integrate Babel as part of their build process.

before

@layershifter layershifter changed the title Chore: switch to Babel RFC: switch to Babel May 17, 2019
@miroslavstastny
Copy link
Member

Requires changes in project structure as we can't use required -- -isolatedModules to work properly

See also: babel/babel#9944

@TheAifam5
Copy link

TheAifam5 commented Jun 4, 2019

So I can confirm that babel did not fixed the issue. Please read this: babel/babel#9895

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
vsts Paired with ticket in vsts
Projects
No open projects
Core Team
  
Priority
4 participants