Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
perf(cli): 关闭 tree shaking 提升开发环境编译速度
Browse files Browse the repository at this point in the history
fix #298
  • Loading branch information
Darmody authored and yesmeck committed Nov 4, 2019
1 parent 8e52818 commit 698dbe2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/remax-cli/src/__tests__/helpers/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default async function build(app: string, target: string) {
progress: false,
rollupOptions: {
external: ['react', 'react-reconciler', 'scheduler'],
treeshake: true,
},
alias: {
'@': 'src',
Expand Down
1 change: 1 addition & 0 deletions packages/remax-cli/src/build/rollupConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ export default function rollupConfig(
}

const config: RollupOptions = {
treeshake: process.env.NODE_ENV === 'production',
...options.rollupOptions,
input: [entries.app, ...entries.pages.map(p => p.file), ...entries.images],
output: {
Expand Down

1 comment on commit 698dbe2

@vercel
Copy link

@vercel vercel bot commented on 698dbe2 Nov 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.