Comments (8)
找到原因了, microsoft/TypeScript#18008
from download-kernel.
transpile模式下确实会和命令行不一样
from download-kernel.
vite-plugin-ts这插件居然真有人用😂
from download-kernel.
咋了,我需要用到装饰器做依赖注入,搜了一下就用了
from download-kernel.
挺好啊
至于类型的问题,transpileModule只能看到当前文件的内容,获得的信息有限。而tsc针对的是整个项目,获得的信息更全面。我估计是这个原因导致的差异。
既然问题解决了,issue我关了
from download-kernel.
@CarterLi 是否也可以像 ts-loader
那样提供一个 https://github.com/TypeStrong/ts-loader#transpileonly transpileonly
的选项使这个问题缓解
from download-kernel.
我研究了一下,transpileonly不是一个简单的开关,ts-loader对于是否开启transpileonly使用了完全不同的逻辑
然后这逻辑我看不懂。。。你有兴趣研究的话可以开PR @agileago
from download-kernel.
先把项目迁移到 vue-cli 吧, vite后期看看有空再搞
from download-kernel.
Related Issues (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 download-kernel.