unbuild
unbuild copied to clipboard
ouput file
Environment
"unbuild": "^2.0.0" node: 16.20.0
Reproduction
non
Describe the bug
没有根据 package.json 的字段生成相应文件,后缀应该是 .js & .cjs
Additional context
No response
Logs
No response
package.json 有配置 "type": "module"
build.config.js
import { defineBuildConfig } from 'unbuild'
export default defineBuildConfig({
entries: ['src/index'],
clean: true,
declaration: true,
rollup: {
emitCJS: true
}
})
main 和 module 字段写反了,请忽略...修正后表现一样
Hi. sorry the question is unclear please reopen with reproduction