
外部精选
软件工程
#开发者实时流开发者发布 include-content,无需应用 JavaScript 实现懒加载
来源标题:Show HN: <include-content> – Lazy loading with no app JavaScript
开发者推出 @excom/include-content,可在不编写应用 JavaScript 的情况下实现视图懒加载、条件渲染和 portalling。该包可通过 NucleusKit 或直接引入 UMD 脚本使用,也可以通过 npm 安装。
Hacker News 最新joe-excom2026/11/25 · 今天4 分钟阅读
以下正文由 AI 翻译自 Hacker News 最新(原文版权归原站所有),可能存在偏差,重要内容请以原文为准。
在需要的时间和地点渲染视图的一站式方案——懒加载/卸载、条件渲染、传送(portalling)……无需应用 JS。
该包可在 NucleusKit 中使用,也可以单独使用:
<script src="https://unpkg.com/@excom/kit-utils@0.3.0/dist/index.umd.min.js"></script> <script src="https://unpkg.com/@excom/neutron@0.2.0/dist/index.umd.min.js"></script> <script src="https://unpkg.com/@excom/include-content@0.1.4/dist/index.umd.min.js"></script> <link rel="stylesheet" href="https://unpkg.com/@excom/include-content@0.1.4/dist/index.css">npm install @excom/include-content
HTML Imports
JS / CSS Imports
<!-- import path to `node_modules` will depend on your build setup --> <script type="module" src="/node_modules/@excom/include-content"></script> <link rel="stylesheet" href="/node_modules/@excom/include-content">import "@excom/include-content";
Peer dependencies (0)
使用方必须与该包一起安装的包。工作区依赖会被打包。
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。
