Open zwc-real opened 6 days ago
Bug Type: Build
Build
3.2.27
2.7.5
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Rollup
el-image
Github Repo
pnpm install pnpm build
element-plus/packages/components/image/src/image.ts编译为dist/element-plus/es/components/image/src/image.mjs
element-plus/packages/components/image/src/image.vue编译为dist/element-plus/es/components/image/src/image2.mjs
与官方提供的npm下载包一致
image.vue和image.ts文件,会随机编译成image.mjs和image2.mjs。代码相同的情况下,每次编译生成的产物会不同,具有不确定性
(empty)
https://github.com/element-plus/element-plus/blob/990aa4b768619d4a57cc17d21f5fc85c4a420c21/internal/build/src/tasks/modules.ts#L17-L23
由于rollup build是多线程的,element-plus中出现了较多同目录下相同名称不同后缀名的文件,且保持了原有目录结构、文件名未添加hash指纹,所以build产生的文件名会根据build完成的先后顺序随机变化。 为了保持构建后文件名以及内容对应的相对稳定,建议根据不同后缀名分批次按顺序构建。
Bug Type:
Build
Environment
3.2.27
2.7.5
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Rollup
Reproduction
Related Component
el-image
Reproduction Link
Github Repo
Steps to reproduce
What is Expected?
element-plus/packages/components/image/src/image.ts编译为dist/element-plus/es/components/image/src/image.mjs
element-plus/packages/components/image/src/image.vue编译为dist/element-plus/es/components/image/src/image2.mjs
与官方提供的npm下载包一致
What is actually happening?
image.vue和image.ts文件,会随机编译成image.mjs和image2.mjs。代码相同的情况下,每次编译生成的产物会不同,具有不确定性
Additional comments
(empty)