songray 最近的时间轴更新
songray's repos on GitHub
Go · 199 人关注
goread
cli epub reader written in Go
TypeScript · 131 人关注
faker-server
Mock server based on faker.js with a web interface. 基于 Faker.js 的 mock 服务器,包含客户端管理界面。
TypeScript · 17 人关注
guesslang-js
A JavaScript library that uses machine learning to detect source code languages
TypeScript · 3 人关注
github-persona
Vue · 1 人关注
gpt-chat-snippet
TeX · 0 人关注
100-Cpp-Mistakes-and-How-to-Avoid-Them
《100 C++ Mistakes and How to Avoid Them》的非专业个人翻译
HTML · 0 人关注
agricultural-information
TypeScript · 0 人关注
ai-md-translate-server
0 人关注
alien-signals-annotate
👾 The lightest signal library
0 人关注
article-extractor
To extract main article from given URL with Node.js
0 人关注
awesome-faker
😎 A curated list of awesome things related to Faker 🐼
TypeScript · 0 人关注
BillBuddy
0 人关注
blinko
An open-source, self-hosted personal AI note tool prioritizing privacy, built using TypeScript .
0 人关注
clash-verge-rev
A modern GUI client based on Tauri, designed to run in Windows, macOS and Linux for tailored proxy experience
0 人关注
CodeStyle
Vue · 0 人关注
cybernet
0 人关注
drawstamputils
Draw Stamp Utils with Javascript
TypeScript · 0 人关注
EchoRSS
TypeScript · 0 人关注
EdgeFeeds
0 人关注
edgetunnel
0 人关注
electron-markdown-editor
Electron Markdown editor
0 人关注
elk-playground
A low footprint JavaScript engine for embedded systems showcase
Vue · 0 人关注
ESClient
JavaScript · 0 人关注
esm-react-transform
0 人关注
flutter_server_pack
ServerPack - my personal fork of flutter_server_box
JavaScript · 0 人关注
foliate-js
Render e-books in the browser
Go · 0 人关注
Formatter
Java · 0 人关注
GeckoTVBrowser
A powerful Gecko-based browser for Android TV and VR
Go · 0 人关注
go-embed-exec
Go · 0 人关注
go-lua
songray

songray

🏢  前端开发工程师
V2EX 第 562248 号会员,加入于 2021-11-18 19:55:55 +08:00
今日活跃度排名 127
Just for fun.
songray 最近回复了
@Radeon 那你自己用 rollup 把 cdn 上的 react.cjs 转一下就行了,不需要直接从源码 build esm 。

你可以参考一下我刚刚写的 demo 或者直接用 dist 文件夹下的产物。

https://github.com/Ray-D-Song/esm-react-transform
这个问题已经存在很多年了,不管是源码还是编译脚本没有考虑过 ESM ,要改的话至少需要几个人一起着手,不是 AI 能干的。
https://github.com/facebook/react/issues/11503
https://github.com/facebook/react/issues/10021

更关键的一点是,React 几乎所有子模块都是 internal ,没法进行摇树,所以提供 ESM 也没啥意义,你为什么不用 UMD 或者 CJS ?
@lisxour
和 pkg 以及 nexe 一样,需要自己使用 esbuild 、ncc 之类的工具把项目转换成单个的 js 文件,所以兼容性是那些工具保证的。
@byte10 你说的应该 nexe 和 pkg 吧,这俩也是打包可执行文件的工具,npx 是执行远程脚本用的。

其实原理都是把代码嵌入到 js 运行时里面,运行的时候再提取代码,不过因为 js 有 cjs 和 esm 两种格式,所以确实有可能兼容性问题。
这玩意 Ruby on Rails 社区早就有类似方案了,叫 Turbo 。

https://www.hotrails.dev/

和 HTMLX 一样,都是不堪重用的东西。
@dragondove 因为这个设置不能搭配 language server 使用,具体的表述是:
Include unimported packages in auto-complete suggestions. Not applicable when using the language server.
@songray 顺带提一嘴,Copilot 5 月开始高级模型调用限制 300 次,超出的 0.04 刀一次。
结合之前微软说过一个 Copilot 用户每个月亏损 80 美元,以及 Cursor 开始砍上下文长度和 Windsurf 涨价,明显各家开始烧不起了。
所以以后只会越来越难用,“想试试便宜的能搭配 deepseek 的看看效果” 还是算了吧...
Cursor 补全强是训练了自己的 MoE 模型,替代品是 Supermaven (已经被 Cursor 收购,但继续提供服务)。
至于 Chat 、Edit 、Agent 就全看上下文长度,Cursor 一开始一骑绝尘,最近也被砍成脑残了,动不动失忆,和 Copilot Chat 处于一个 60 一个 70 的水平。
最强的 Agent 插件还是 Cline + 自己提供 Claude3.7 或者 Gemini 2.5 的 API ,比 Cursor 那个砍了一刀的要强很多。

总结:Supermaven + Cline
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1686 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 21ms · UTC 16:27 · PVG 00:27 · LAX 09:27 · JFK 12:27
Developed with CodeLauncher
♥ Do have faith in what you're doing.