Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

solid-js is being bundled twice in production and not in dev

未关闭
#112 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
38/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
typescript, vite
领域
build-system

调研方向

首先检查 plugin 中与 dedup 和 optimizeDeps 相关的开发和生产配置;该 issue 没有指定文件或测试。比较 solid-js 在两种模式下的打包方式,并参考相关的 Solid issue 作为背景。完成的标准是生产构建避免将 solid-js 打包两次,同时保留现有的开发行为。

由索引模型根据 Issue 内容生成。

描述

In dev mode solid-js module is being dedup to ensure its only being bundled once. But when you build for production its not and thus solid-js can be bundled twice leading to side effects like createEffect not having a root because there are two solids running.

I think the solution is to always set dedup and optimizeDeps to the libraries you have listed to prevent them from being bundled twice or be able to pass in dedupe: [...nestedDeps, ...solidPkgsConfig.nestedDeps]

This is related to: https://github.com/solidjs/solid/issues/1843 and is the root cause of that issue.

主要语言
TypeScript
星标
522
派生
72
平均合并
20 小时 1 分钟
30 天内合并 PR
31

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

solidjs/solid-vite-plugin 的其他 Issue

查看 solidjs/solid-vite-plugin 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。