Skip to content

Integrate TypeScript

Antony Budianto edited this page Mar 23, 2019 · 3 revisions

Credits: @janjachacz

Supported since [email protected]

const webpackMerge = require("webpack-merge");

const tsConfig = {
  resolve: {
    extensions: [".ts", ".tsx"]
  },
  module: {
    rules: [
      {
        test: /\.(ts|tsx)$/,
        loaders: "babel-loader",
        options: {
          babelrc: false,
          extends: "./node_modules/cra-universal/src/config/server/.babelrc"
        }
      }
    ]
  }
};

module.exports = {
  webpackPlugins: [],
  modifyWebpack: config => webpackMerge(config, tsConfig)
};

Please give your support by ⭐️ starring ⭐️ this repo, Thank you 🎉 🎉 🎉

Clone this wiki locally