Skip to content

Commit

Permalink
chore: 新增css打包是否切割配置
Browse files Browse the repository at this point in the history
  • Loading branch information
kailong321200875 committed Dec 25, 2023
1 parent 4dbff1b commit b2cee10
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@ VITE_USE_BUNDLE_ANALYZER=false
VITE_USE_ALL_ELEMENT_PLUS_STYLE=false

# 是否开启mock
VITE_USE_MOCK=true
VITE_USE_MOCK=true

# 是否切割css
VITE_USE_CSS_SPLIT=false
5 changes: 4 additions & 1 deletion .env.gitee
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@ VITE_USE_BUNDLE_ANALYZER=false
VITE_USE_ALL_ELEMENT_PLUS_STYLE=false

# 是否开启mock
VITE_USE_MOCK=true
VITE_USE_MOCK=true

# 是否切割css
VITE_USE_CSS_SPLIT=false
5 changes: 4 additions & 1 deletion .env.pro
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@ VITE_USE_BUNDLE_ANALYZER=true
VITE_USE_ALL_ELEMENT_PLUS_STYLE=false

# 是否开启mock
VITE_USE_MOCK=true
VITE_USE_MOCK=true

# 是否切割css
VITE_USE_CSS_SPLIT=false
5 changes: 4 additions & 1 deletion .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@ VITE_USE_BUNDLE_ANALYZER=false
VITE_USE_ALL_ELEMENT_PLUS_STYLE=false

# 是否开启mock
VITE_USE_MOCK=true
VITE_USE_MOCK=true

# 是否切割css
VITE_USE_CSS_SPLIT=false
3 changes: 2 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
echarts: ['echarts', 'echarts-wordcloud']
}
}
}
},
cssCodeSplit: !(env.VITE_USE_CSS_SPLIT === 'false')
},
server: {
port: 4000,
Expand Down

0 comments on commit b2cee10

Please sign in to comment.