Electron-react-boilerplate: How to Drop Typescript for Js

Created on 29 Oct 2020  路  3Comments  路  Source: electron-react-boilerplate/electron-react-boilerplate

I want to use JSX not TSX, gives loader not configured for this file type.

doc question

Most helpful comment

In webpack.config.base.js add jsx file extension it will work.

  module: {
    rules: [
      {
        test: /\.jsx?$/,
        exclude: /node_modules/,
        use: {
          loader: 'babel-loader',
          options: {
            cacheDirectory: true,
          },
        },
      },
      {
        test: /\.tsx?$/,
        exclude: /node_modules/,
        use: {
          loader: 'babel-loader',
          options: {
            cacheDirectory: true,
          },
        },
      },
    ],
  },
...

All 3 comments

In webpack.config.base.js add jsx file extension it will work.

  module: {
    rules: [
      {
        test: /\.jsx?$/,
        exclude: /node_modules/,
        use: {
          loader: 'babel-loader',
          options: {
            cacheDirectory: true,
          },
        },
      },
      {
        test: /\.tsx?$/,
        exclude: /node_modules/,
        use: {
          loader: 'babel-loader',
          options: {
            cacheDirectory: true,
          },
        },
      },
    ],
  },
...

Are there now plans to drop TypeScript for v3? I'm already struggling to re-implement Redux to v2. I'd hate to see this project lose TypeScript as well.

@NicolasNewman There aren't any plans to drop TS in v3

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davej picture davej  路  4Comments

ceemion picture ceemion  路  3Comments

thehatami picture thehatami  路  3Comments

SirWindfield picture SirWindfield  路  3Comments

andy547320 picture andy547320  路  3Comments