question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does latest version work with ts-loader

See original GitHub issue

Hi,

Thanks for the amazing library. I started to use this when the version was 3.2.3 and react-script at 2.1.3. At that time CRA didn’t have support for typescript. Hence I configured to use ts-loader to create my project in typescript with overriding webpack config

overrideWebpackConfig: ({ webpackConfig, context: { env, paths } }) => {
          const {
            match: { loader: tsLoader }
          } = getLoader(webpackConfig, loaderByName('ts-loader'));
          tsLoader.options = {
            ...tsLoader.options,
            getCustomTransformers: () => ({
              before: [
                tsImportPluginFactory({
                  libraryDirectory: 'es',
                  libraryName: 'antd',
                  style: true
                })
              ]
            })
          };

Does the latest version support use of ts-loader? I am not a big fan of babel support for typescript as it still doesn’t support most features and every time I need to look for babel plugin to make sure the transpilation works.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
socketpaircommented, Feb 20, 2021

So just how to tune options of ts-loader using craco ?! in 2021 ?

0reactions
Anoupzcommented, Jun 20, 2019

@patricklafrance Awesome that worked thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

ts-loader - npm
TypeScript loader for webpack. Latest version: 9.4.2, last published: 25 days ago. Start using ts-loader in your project by running `npm i ...
Read more >
how to specify typescript version to ts-loader? - Stack Overflow
I intend to use typescript@2 but I have no clue how to tell ts-loader to use the proper version... Add typescript@2 to your...
Read more >
CHANGELOG.md - TypeStrong/ts-loader - GitHub
Upgrade chalk , loader-utils , and semver to latest stable versions - thanks ... webpack 2. ts-loader 2.x may work with webpack 1...
Read more >
TypeScript - webpack
In this guide we will learn how to integrate TypeScript with webpack. Basic Setup. First install the TypeScript compiler and loader by running:...
Read more >
ts-loader/CHANGELOG.md - UNPKG
259, * ts-loader now officially only supports webpack 2. ts-loader 2.x may work with webpack 1 but it is not supported. Related to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found