unjs / unbuild

📦 A unified JavaScript build system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ouput file

hzhoup opened this issue · comments

commented

Environment

"unbuild": "^2.0.0"
node: 16.20.0

Reproduction

non

Describe the bug

没有根据 package.json 的字段生成相应文件,后缀应该是 .js & .cjs

image

image

Additional context

No response

Logs

No response

commented

package.json 有配置 "type": "module"

commented

build.config.js

import { defineBuildConfig } from 'unbuild'

export default defineBuildConfig({
  entries: ['src/index'],
  clean: true,
  declaration: true,
  rollup: {
    emitCJS: true
  }
})
commented

mainmodule 字段写反了,请忽略...修正后表现一样

Hi. sorry the question is unclear please reopen with reproduction