Bug: replace module names incorrectly (default import)
See original GitHub issueHey
First of all, thanks for this awesome package 😁
We have a small bug.
Steps
- Import
sharp
with:
import sharp from 'sharp';
// ...
- Run
"tsc && tsc-alias"
Expected
Compiled to JS:
const sharp_1 = __importDefault(require('sharp'));
Actual
Compiled to JS:
const sharp_1 = __importDefault(require('../sharp'));
So there the bug is here! If I remove tsc-alias
, I can run the project successfully (via tsconfig-paths
for testing)
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Import-Module: incorrect scope, confusing parameters, wrong ...
I am not sure what but something is wrong: If the documentation is correct then Import-Module imports to the wrong scope by default,...
Read more >Importing from builtin library when module with same name ...
The best solution, if possible, is to avoid naming your modules with the same name as standard-library or built-in module names. Share.
Read more >Traps for the Unwary in Python's Import System
The reason this is problematic is that every module in that directory is now potentially accessible under two different names: as a top...
Read more >When Things Go Wrong — PyInstaller 5.7.0 documentation
Find a module name, then keep clicking the “imported by” links until you find the top-level import that causes that module to be...
Read more >Built-in Exceptions — Python 3.11.1 documentation
The default traceback display code shows these chained exceptions in ... When set they represent the name of the module that was attempted...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for your flashy quick response ❤️
Yep, and I fixed it with:
Well, I guess that should be a breaking change then 😁
Not working with neither
baseurl
norbaseUrl
norBaseUrl
, it’sbase-url
: