Git Product home page Git Product logo

Comments (2)

DorianGrey avatar DorianGrey commented on August 18, 2024

The statement you mentioned isn't an official one, and it's ... wrong.
Just take a look at the webpack configurations ...
E.g.:

test: /\.(js|jsx|mjs)$/,
include: paths.appSrc,
loader: require.resolve('babel-loader'),
options: {
// @remove-on-eject-begin
babelrc: false,
presets: [require.resolve('babel-preset-react-app')],
// @remove-on-eject-end
compact: true,
},

It's still allowed to import and use js files, which might be quite common during migrations. At least there were quite a lot of requests for this. Since require.resolve is used to avoid clunky webpack message when a loader could not be found, it is enforced that these packages are present - they are resolved before the build.
babel-code-frame is used by the type checker to generate a code frame for each reported error.
babel-jest is referenced by jest by default, and thus cannot be omitted.

from create-react-app-typescript.

danielkcz avatar danielkcz commented on August 18, 2024

Isn't TypeScript capable of transforming JavaScript as well? It's just a file without types, so it shouldn't be a problem, right?

That said, if we would remove Babel completely, we would close the path for babel-plugin-macros which is extremely handy and used by more and more projects now and included in CRA2. However, in the and it means that we need to use babel-loader for TypeScript files as well.

from create-react-app-typescript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.