Q
Q
quiplunar2020-06-28 21:09:22
JavaScript
quiplunar, 2020-06-28 21:09:22

What is the best way to connect typescript?

Connected typescript via preset in babel. And the question is how is it better to connect it, through the loader or through the preset?

And if you connect ts via preset, will the config for ts at the root of the application work?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
profesor08, 2020-06-29
@quiplunar

Connect however you want. The config will work.
But I would recommend connecting it as a loader, and already processing its output through babel. But why do you need babel then, except to connect polyfills. Since typescript itself transforms everything in accordance with the settings.

rules: [
      {
        test: /\.[jt]+sx?$/,
        use: "ts-loader",
        exclude: /node_modules/,
      },
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question