提交 d38146e8 编写于 作者: fxy060608's avatar fxy060608

chore: merge

...@@ -128,8 +128,11 @@ function generateCssCode(config: ResolvedConfig) { ...@@ -128,8 +128,11 @@ function generateCssCode(config: ResolvedConfig) {
if (define.__UNI_FEATURE_NAVIGATIONBAR_SEARCHINPUT__) { if (define.__UNI_FEATURE_NAVIGATIONBAR_SEARCHINPUT__) {
cssFiles.push(BASE_COMPONENTS_STYLE_PATH + 'input.css') cssFiles.push(BASE_COMPONENTS_STYLE_PATH + 'input.css')
} }
if (config.command === 'serve') { const enableTreeShaking = isEnableTreeShaking(
// 开发模式,自动添加所有API相关css parseManifestJsonOnce(process.env.UNI_INPUT_DIR)
)
if (config.command === 'serve' || !enableTreeShaking) {
// 开发模式或禁用摇树优化,自动添加所有API相关css
Object.keys(API_DEPS_CSS).forEach((name) => { Object.keys(API_DEPS_CSS).forEach((name) => {
const styles = API_DEPS_CSS[name as keyof typeof API_DEPS_CSS] const styles = API_DEPS_CSS[name as keyof typeof API_DEPS_CSS]
styles.forEach((style) => { styles.forEach((style) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册