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.

Support TypeScript 4.1

See original GitHub issue

TypeScript 4.1 adds an option to use path mapping without specifying baseUrl, more about it in TypeScript 4.1 Release Notes

My project is using TypeScript 4.1.2, trying to remove the baseUrl I get the following error

Failed to load tsconfig.json: Missing baseUrl in compilerOptions tsconfig-paths-webpack-plugin: Found no baseUrl in tsconfig.json, not applying tsconfig-paths-webpack-plugin

Would like to submit a PR with a little help 😃

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:5
  • Comments:10

github_iconTop GitHub Comments

4reactions
jakebaileycommented, Dec 30, 2021

Sure, the function I wrote to generate aliases is here: https://github.com/microsoft/pyright/blob/169c6089b9914870c43622743c75844657cd9d70/build/lib/webpack.js#L90

resolve.alias gets set to the return value of this function.

As far as I can tell, this is all you need to support tsconfig paths. It verifies enough to make the file ts-check (hence the asserts), but otherwise is all that’s really needed to make paths work, no plugin needed.

1reaction
jakebaileycommented, Dec 30, 2021

I have no idea what storybook is, but I don’t see why not. Can’t hurt to try.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - TypeScript 4.1
That's why TypeScript 4.1 brings the template literal string type. It has the same syntax as template literal strings in JavaScript, but is...
Read more >
What's New in TypeScript 4.1? - Better Programming
TypeScript 4.1 supports React 17's jsx and jsxs factory functions through two new options for the jsx compiler option: react-jsx; react-jsxdev. “These options ......
Read more >
typescript - npm
TypeScript is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale ...
Read more >
TypeScript 4.1 Syntax Support · Issue #2583 - GitHub
TypeScript 4.1 Syntax Support #2583 · TypeScript 4.1 Syntax Support #2583 · Template Literal Types · Key Remapping in Mapped Types · Recursive ......
Read more >
TypeScript 4.1 for Visual Studio
This is a standalone, power tool release of TypeScript 4.1 for Visual Studio. It includes both the TypeScript experience for Visual Studio and...
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