npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ifs-code-build

v0.0.5

Published

Mixo Code 与 IFS Code 共用的前端构建配置

Readme

mixo-code-build

Mixo Code 与 IFS Code 共用的前端构建配置,统一发布为 ifs-code-build。

Proprietary software. 未经授权不得复制、修改或再分发。本包发布到公共 npm registry 仅用于依赖安装,不代表以开源协议授权。

使用

import { defineMixoConfig } from 'ifs-code-build';

export default defineMixoConfig({
  preset: 'react',
});

Vite 由本包统一管理版本,项目脚本仍然使用原生 Vite 命令:

{
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "preview": "vite preview"
  }
}

当前 Mixo/IFS WebContainer 使用 npm 安装依赖,npm scripts 可以访问本包安装的 Vite。使用 pnpm 时应通过 pnpm run 执行脚本;pnpm 11 还需要允许 esbuild 执行安装脚本。

项目有额外配置时,通过 vite 字段追加:

export default defineMixoConfig({
  preset: 'react',
  vite: {
    resolve: {
      alias: {
        moment: 'moment/moment.js',
      },
    },
  },
});

Preset

  • react:React/ReactDOM CDN、externals、UMD 输出及通用开发服务器配置。
  • react-iife:React IIFE 单文件构建,适用于 CUI、Marquex 和普通 Cube 模板。
  • widget:Widget standalone 页面配置。
  • widget-library:Widget 可嵌入产物、唯一 CSS 作用域、动画隔离和 schema 复制配置。
  • micro:Marquex/Cube 微前端 UMD 产物配置。
  • vanilla:无框架的 Vite 构建配置。

Widget scope 优先使用 mixo.config.json 中的 appId(兼容现有 chatId 字段),并同步注入构建后的 JS 与 CSS。业务 className 不会被改写;Tailwind 动态条件可以正常使用,但类名仍需以完整字符串出现在源码或 safelist 中。

开发

npm install
npm run typecheck
npm run build

发布前更新 package.json 的版本号,然后执行:

npm run publish:dry-run
npm publish

Vite 兼容约束

当前固定使用 Vite 4.5.14,原因是 Mixo/IFS WebContainer 暂不兼容更高版本。Vite 仅用于 WebContainer 内的开发预览和静态产物构建,不得作为线上 HTTP 服务使用。升级 Vite 前必须完成 install、dev、HMR 和 build 回归验证。