unbuild icon indicating copy to clipboard operation
unbuild copied to clipboard

ouput file

Open hzhoup opened this issue 2 years ago • 3 comments

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

hzhoup avatar Sep 15 '23 01:09 hzhoup

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

hzhoup avatar Sep 15 '23 01:09 hzhoup

build.config.js

import { defineBuildConfig } from 'unbuild'

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

hzhoup avatar Sep 15 '23 01:09 hzhoup

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

hzhoup avatar Sep 15 '23 01:09 hzhoup

Hi. sorry the question is unclear please reopen with reproduction

pi0 avatar Jun 04 '24 23:06 pi0