私信 访问主页
As the picture shown, the generated file index.esm.d.ts contains OS-specific path imports:
More importantly, Suggestion interface is redefined...
该提问来源于开源项目 wessberg/rollup-plugin-ts
点赞 写回答 收藏 复制链接分享 删除 再等等 结题 再想想 8条回答私信 访问主页
The issue has been fixed and released in v1.1.55. Thanks for reporting it!
点赞 评论 复制链接分享私信 访问主页
I m investigating the issue, and the issue is related to a couple of things:
When comparing two paths or filenames, rollup-plugin-ts always assume that they follow POSIX. For example, there are strict equality checks between generated filenames for Rollup chunks, which use the path convention of the OS, and Typescript sourcefile filenames, which are normalized to POSIX by Typescript itself. This means that some comparisons fail that wouldn t on MacOS where everything is POSIX.
The path module is used heavily to normalize file paths. However, they aren t normalized to POSIX when generating new ImportDeclarations and ExportDeclarations which means that stuff like import {foo} from \\\\a\\\\b\\\\c can happen where you would expect import {foo} from ./a/b/c instead.
I m working on fixing these things and I m testing both on MacOS and Windows. I ll keep you posted.
点赞 评论 复制链接分享私信 访问主页
I m on a Windows 10 box and I d like to offer my help, too, should you need some.
I just switched to rollup-plugin-ts to build my own plugin. For now, I m using a separate build step to generate the declaration file and I d rather have your plugin do all the dirty job in one step.
I ve tried taking a look at your source code but it s dense and hard to follow when not used to. Just give some directions as to where to look in first.
edit: FWIW, using a bunch of console.log()s showed that when entering the deconflict() function in src\\service\\transformer\\declaration-bundler\\deconflict\\deconflict.ts, sourceFile.fileName is normalized while options.localModuleNames is not. Hope this helps.
私信 访问主页
Any help I can try? Not familiar with code but the plugin is awesome. It s better than the official one.
点赞 评论 复制链接分享私信 访问主页
Yes there is, but grouped by emitted chunk, and since the import paths are broken, the logic for determining whether or not symbols are defined is broken on Windows
点赞 评论 复制链接分享私信 访问主页
Is there any code determining whether a symbol is bundled or imported? As the picture shows, the Suggestion interface is declared twice.
点赞 评论 复制链接分享私信 访问主页
Hi there, thanks for reporting this issue.I think this issue and https://github.com/wessberg/rollup-plugin-ts/issues/19 are related.
Looking at the image, the import paths look wrong, so I m certain that the issue is related to how relative paths are computed by the plugin.
I ll try to spin up a Windows VM and test it
点赞 评论 复制链接分享私信 访问主页
It works fine under OS X (without the duplicated imports). Seems like a problem related to path.
点赞 评论 复制链接分享 提交 再想想 采纳 为你推荐 将Elasticsearch DSL转换为gopkg.in/olivere/elastic.v5 elasticsearch 1个回答Golang内置了docker和requirements.txt docker 1个回答GoImports杀死html语法高亮显示 vim 1个回答goimports无法与vim-go插件配合使用 vim 2个回答Golang构建错误:无法将* sqlx.DB分配给* sql.DB it技术互联网问答IT行业问题计算机技术编程语言问答 1个回答exec:“ gcc”:尝试执行构建时,在%PATH%中找不到可执行文件 cgowindowsbuild 9个回答仅在打开文件上使用Intellij File Watcher intellij-idea 2个回答golang测试错误:在以下任何位置都找不到软件包“ github.com/stretchr/testify/assert”: it技术互联网问答IT行业问题计算机技术编程语言问答 1个回答使用软件包“ golang.org/x/oauth2”对oauth2进行身份验证 oauth2 1个回答Golang代码组织又是否需要调用db.Close()? it技术互联网问答IT行业问题计算机技术编程语言问答 1个回答无法获取parser.ParseDir来解析导入语句 it技术互联网问答IT行业问题计算机技术编程语言问答 1个回答将pubsub与golang一起使用:ocgrpc.NewClientStatsHandler it技术互联网问答IT行业问题计算机技术编程语言问答 2个回答当我与docker compose一起使用go时出现“ No Go files in ...”错误 docker 1个回答play.golang.org如何自动管理导入? it技术互联网问答IT行业问题计算机技术编程语言问答 1个回答不带导入功能的`go run * .go`文件如何访问功能? it技术互联网问答IT行业问题计算机技术编程语言问答 1个回答在Sublime Text中保存运行goimports吗? sublimetext3 3个回答Golang:无法安装软件包zvelo / ttlru package 2个回答错误:标准软件包中的非标准导入“ gopkg.in/yaml.v2” yaml 1个回答在GoLang中保存运行“ goimports” it技术互联网问答IT行业问题计算机技术编程语言问答 3个回答goimports需要忽略供应商软件包 it技术互联网问答IT行业问题计算机技术编程语言问答 2个回答 点击登录 提问题 欢迎建议意见 . 如何写高质量提问和回答? 采纳榜7天 被采纳次数本文链接: http://bergimports.immuno-online.com/view-774236.html