Skip to content

Commit

Permalink
chore: use new build config
Browse files Browse the repository at this point in the history
  • Loading branch information
sonofmagic committed Jul 11, 2024
1 parent a4f3a94 commit 40943ce
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion packages/escape/build.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
import path from 'node:path'
import { defineBuildConfig } from 'unbuild'

export default defineBuildConfig({})
export default defineBuildConfig({
// entries: ['./src/index', './src/cli'],
// entries: ['./src/index'],
rollup: {
// 内联,相当于 nodeResolve
inlineDependencies: true,
// cjs
emitCJS: true,
// 添加 cjs 注入
cjsBridge: true,
dts: {
// https://github.com/unjs/unbuild/issues/135
respectExternal: false,
},
},
alias: {
// 别名
'@': path.resolve(__dirname, './src'),
},
// dts
declaration: true,
})

0 comments on commit 40943ce

Please sign in to comment.