Skip to content

harm-less/swc-path-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

swc-typescript issue

Install dependencies

npm install

Reproduction steps

Run the following command on Windows and it fails, run the same command on MacOS and presumably on Linux and it works:

npm start

On windows the module path being generated is absolute as well as wrong while on MacOS it is relative.

Workarounds

  1. I'm not sure I fully understand, but if you disable/remove swcOptions.jsc.baseUrl from the compile script, on Windows it suddenly starts working.
  2. What also seems to work is changing swcOptions.jsc.paths to ['@utils/*': [ 'dist/utils/*' ]] because then the absolute path is pointing to the correct dir.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published