Skip to content

feat: deploy command generate esm artifact#8306

Merged
zllkjc merged 10 commits intoweb-infra-dev:mainfrom
sylingd:feat/esm-deploy
Mar 17, 2026
Merged

feat: deploy command generate esm artifact#8306
zllkjc merged 10 commits intoweb-infra-dev:mainfrom
sylingd:feat/esm-deploy

Conversation

@sylingd
Copy link
Copy Markdown
Contributor

@sylingd sylingd commented Feb 3, 2026

Summary

  • 在 esm 项目中运行 deploy 命令,将生成 esm 格式的产物
    • solutions/app-tools 增加 esm entry;优化 deploy 的代码组织逻辑,移动公共逻辑至 utils,移动模板至 templates
    • server/bff-core 改为仅使用 compatibleRequire,以前的为了兼容 jest 的代码似乎已经不再有用?
  • 测试完善
    • deploy-server integration tests 增加对产物的验证
    • 增加 pure esm 项目的 deploy 验证
    • 移除过时的 isVersionAtLeast1819 判断
    • 修改 prebundle 后的 lodash 包名称,避免本地测试时 ndepe 复制错误的 lodash 文件。
  • typo 修复
    • allowd -> allowed
    • getServerCombinedModueFile -> getServerCombinedModuleFile
  • compilers 小 BUG 修复
    • modern.config.j/ts中修改dist目录后,在bff项目中运行build命令,bff文件仍然生成到了dist下。原因是options里面也有outDir

integration-test-linux

Related Links

拆分自#8286

Checklist

  • I have added changeset via pnpm run change.
  • I have updated the documentation.
  • I have added tests to cover my changes.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 3, 2026

🦋 Changeset detected

Latest commit: 18ebef7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 114 packages
Name Type
@modern-js/app-tools Minor
@modern-js/bff-core Minor
@modern-js/utils Minor
@modern-js/server-utils Minor
@modern-js/adapter-rstest Minor
@modern-js/plugin-bff Minor
@modern-js/plugin-ssg Minor
@modern-js/plugin-styled-components Minor
@modern-js/plugin-i18n Minor
@modern-js/image Minor
@modern-js/runtime Minor
@modern-js/plugin-polyfill Minor
@integration-test/alias-set Patch
app-document Patch
async-entry-test Patch
tmp Patch
bff-api-app Patch
bff-client-app Patch
bff-indep-client-app Patch
bff-hono Patch
integration-clean-dist-path Patch
integration-compatibility Patch
integration-custom-dist-path Patch
custom-file-system-entry Patch
integration-custom-template Patch
deploy Patch
deploy-server Patch
dev-server Patch
integration-disable-html Patch
entries-app-builder Patch
app-custom-entries Patch
app-custom-routes-runtime Patch
app-custom Patch
app-entry Patch
app-route Patch
app-entry-server Patch
i18n-app-csr-html-lang Patch
i18n-app Patch
i18n-app-ssr-html-lang Patch
i18n-app-ssr Patch
i18n-custom-i18n-wrapper Patch
i18n-mf-app-provider Patch
i18n-mf-component-provider Patch
i18n-mf-consumer Patch
i18n-routes Patch
i18n-routes-ssr Patch
@integration-test/image-component Patch
main-entry-name Patch
nonce Patch
pure-esm-project Patch
routes-match Patch
routes Patch
app-rsbuild-hooks Patch
rsc-csr-app Patch
rsc-csr-routes Patch
rsc-ssr-app Patch
rsc-ssr-routes Patch
basic-app-rstest-browser Patch
basic-app-rstest Patch
runtime-custom-plugin Patch
runtime-custom-config-plugin Patch
select-mul-entry-test Patch
select-one-entry-test Patch
server-config Patch
server-json-script Patch
server-monitors Patch
server-prod Patch
server-routes Patch
@source-code-build/app Patch
ssg-fixtures-mega-list-routes Patch
ssg-fixtures-nested-routes Patch
ssg-fixtures-simple Patch
ssg-fixtures-web-server Patch
ssr-base-async-entry-test Patch
ssr-base-json-test Patch
ssr-base-test Patch
ssr-base-fallback-test Patch
init Patch
ssr-base-loadable Patch
ssr-partial-test Patch
ssr-script-loading Patch
ssr-useid-test Patch
ssr-streaming-inline-test Patch
ssr-streaming-test Patch
integration-storybook Patch
styled-components-stream Patch
styled-components-string Patch
integration-tailwindcss-v2 Patch
integration-tailwindcss-v3 Patch
integration-tailwindcss-v4 Patch
tmp-dir Patch
write-to-dist Patch
@modern-js/bundle-diff-benchmark Minor
@modern-js/builder Minor
@modern-js/plugin-data-loader Minor
@modern-js/render Minor
@modern-js/server-core Minor
@modern-js/create-request Minor
@modern-js/prod-server Minor
@modern-js/server Minor
@modern-js/i18n-utils Minor
@modern-js/plugin Minor
@modern-js/runtime-utils Minor
@scripts/release-node Patch
@modern-js/server-runtime Minor
@modern-js/create Minor
@modern-js/main-doc Minor
@modern-js/tsconfig Minor
@modern-js/bff-runtime Minor
@modern-js/sandpack-react Minor
@modern-js/types Minor
@modern-js/rslib Minor
@scripts/prebundle Patch
@scripts/rstest-config Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 3, 2026

Deploy Preview for modernjs-v3 ready!

Name Link
🔨 Latest commit 2026c14
🔍 Latest deploy log https://app.netlify.com/projects/modernjs-v3/deploys/6982293cc3c196000888d6be
😎 Deploy Preview https://deploy-preview-8306--modernjs-v3.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sylingd sylingd changed the title [WIP] feat: esm deploy feat: esm deploy Feb 3, 2026
@sylingd sylingd changed the title feat: esm deploy feat: deploy command generates esm artifact Feb 3, 2026
@sylingd sylingd changed the title feat: deploy command generates esm artifact feat: deploy command generate esm artifact Feb 3, 2026
@zllkjc
Copy link
Copy Markdown
Member

zllkjc commented Feb 12, 2026

有处理好的 PR 可以艾特我们

@sylingd
Copy link
Copy Markdown
Contributor Author

sylingd commented Feb 12, 2026

有处理好的 PR 可以艾特我们

这个已经处理好啦😄

@sylingd
Copy link
Copy Markdown
Contributor Author

sylingd commented Feb 25, 2026

有处理好的 PR 可以艾特我们

有空看一下这个 PR 哦~

@zllkjc
Copy link
Copy Markdown
Member

zllkjc commented Mar 9, 2026

我这周来抽时间看一下。

@zllkjc
Copy link
Copy Markdown
Member

zllkjc commented Mar 16, 2026

已经 Comment 了,整体没啥疑问,感谢处理了一些过时的代码!

#8428 这个 PR 里有对 netlify.ts 和 vercel.ts 的改动,你可能需要合并一下代码。

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 17, 2026

Deploy Preview for modernjs-byted ready!

Name Link
🔨 Latest commit 18ebef7
🔍 Latest deploy log https://app.netlify.com/projects/modernjs-byted/deploys/69b9142bc83bf1000892fbcc
😎 Deploy Preview https://deploy-preview-8306--modernjs-byted.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 99 (🟢 up 4 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@sylingd
Copy link
Copy Markdown
Contributor Author

sylingd commented Mar 17, 2026

@zllkjc 已经merge主分支(含#8428 ),integration-test-linux 正常

@zllkjc zllkjc enabled auto-merge (squash) March 17, 2026 08:46
@zllkjc
Copy link
Copy Markdown
Member

zllkjc commented Mar 17, 2026

Approval~ @clChenLiang cc

@zllkjc zllkjc merged commit 0fc8c26 into web-infra-dev:main Mar 17, 2026
10 checks passed
@caohuilin caohuilin mentioned this pull request Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants