Comments (2)
Hey @dgpt Thanks for the feedback, I will take a look soon, but PR is welcome if you already came up with a fix :)
from dts-loader.
I spent some time digging into this a bit. Ideally we'd use Typescript's module resolution logic directly (to avoid re-implementing the resolution logic), but I can't seem to figure out a good way to do this. I'm thinking it might be possible to do this with the typescript object, but A) trying to find documentation for this is proving to be impossible and B) there's a lot of stuff to sift through. Since you've been using the typescript object in the plugin already, you might have some more insight into this :)
I've also tried using node's require.resolve
, but that doesn't seem to like the absolute paths we have in emitFile
.
If we just put inputFilePath
into the resolver function (wherever it may be) on line 119 in emitFile
, I think we'd be in business.
const inputFilePath = path.resolve(cwd, value)
if (inputFilePath === fileName) {
from dts-loader.
Related Issues (13)
- Example HOT 7
- export default support HOT 2
- Support for nested exposures HOT 4
- Support for React.forwardRef HOT 2
- Are there plans to support Vue files? HOT 2
- Create types without dist folder
- Unexpected token } in JSON at position 226 HOT 1
- Include opt in tar functionality? HOT 2
- Include opt in tar functionality?
- Project loads the component but the typings still can't be found HOT 4
- Unable to download remote types when publicPath is not auto HOT 6
- Loader does not support exposed dependencies from node_modules 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 dts-loader.