Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question