Comments (5)
I had the same issue, this fixed it. going to use patch-package til the author has time to update.
from tsc-alias.
For anyone interested:
patches/tsc-alias+1.8.8.patch
:
diff --git a/node_modules/tsc-alias/dist/utils/import-path-resolver.js b/node_modules/tsc-alias/dist/utils/import-path-resolver.js
index ebaf620..227d4c7 100644
--- a/node_modules/tsc-alias/dist/utils/import-path-resolver.js
+++ b/node_modules/tsc-alias/dist/utils/import-path-resolver.js
@@ -5,8 +5,9 @@ const normalizePath = require("normalize-path");
const fs_1 = require("fs");
const path_1 = require("path");
const anyQuote = `["']`;
+const excludeLocalImportSyntax = `[(?!\.)]`;
const pathStringContent = `[^"'\r\n]+`;
-const importString = `(?:${anyQuote}${pathStringContent}${anyQuote})`;
+const importString = `(?:${anyQuote}${excludeLocalImportSyntax}${pathStringContent}${anyQuote})`;
const funcStyle = `(?:\\b(?:import|require)\\s*\\(\\s*(\\/\\*.*\\*\\/\\s*)?${importString}\\s*\\))`;
const globalStyle = `(?:\\bimport\\s+${importString})`;
const fromStyle = `(?:\\bfrom\\s+${importString})`;
from tsc-alias.
This should be closed now that we pushed a fix #218
from tsc-alias.
@U-4-E-A Your fix breaks all tests. Please send a PR. THANKS
from tsc-alias.
I don't have a PR available, sorry. My own testing was simply done by running the CLI on my packages.
from tsc-alias.
Related Issues (20)
- js files don't get transpiled when allowJS is true
- tsc-alias incorrectly replace a module when a file with same name exists in the current directory HOT 2
- production build module without .js from node_modules (symlink)
- How to live preview with this command?
- tsc-alias has bad baseUrl when project name matches folder in external alias HOT 1
- How to use it with webpack ?
- How to tsc-alias it with mocha? HOT 1
- baseUrl value is not accurately recognized
- Libraries imports are replaced with alias HOT 2
- Path starting with @ is not replaced
- BUG :: tsc-alias making relative a package.json defined lib HOT 2
- Aliasing root directory is not working HOT 2
- Integration with ts-patch
- .css files cannot escape alias files
- Incorrect resolveFullPaths
- Is it possible to only use my own replacer? HOT 1
- Exclude alias?
- Single path transformation
- Path aliasing issue with tsc-alias since v1.4.2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tsc-alias.