Skip to content

Commit

Permalink
perf(create-vite): exclude transpiled prompts code
Browse files Browse the repository at this point in the history
This reduces bundled code: 355kB => 188kB
  • Loading branch information
sapphi-red committed Jul 11, 2022
1 parent b120264 commit 480057e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/create-vite/build.config.ts
Expand Up @@ -11,6 +11,10 @@ export default defineBuildConfig({
minify: true
}
},
alias: {
// we can always use non-transpiled code since we support 14.18.0+
prompts: 'prompts/lib/index.js'
},
hooks: {
'rollup:options'(ctx, options) {
options.plugins ??= []
Expand Down

0 comments on commit 480057e

Please sign in to comment.