-
Notifications
You must be signed in to change notification settings - Fork 4.9k
不同页面有相同样式时不生成页面样式文件 #19485
Copy link
Copy link
Open
Labels
F-vue3Framework - Vue 3Framework - Vue 3T-alipayTarget - 编译到支付宝小程序Target - 编译到支付宝小程序T-ddT-feishuT-h5Target - 编译到 H5Target - 编译到 H5T-harmonyTarget - 编译到 HarmonyTarget - 编译到 HarmonyT-harmony_hybridTarget - 编译到 Harmony (Hybird 模式)Target - 编译到 Harmony (Hybird 模式)T-jdTarget - 编译到京东小程序Target - 编译到京东小程序T-kwaiT-qqTarget - 编译到 QQ 小程序Target - 编译到 QQ 小程序T-quickappTarget - 编译到快应用Target - 编译到快应用T-qyT-rnTarget - 编译到 React NativeTarget - 编译到 React NativeT-swanTarget - 编译到百度小程序Target - 编译到百度小程序T-ttTarget - 编译到字节跳动小程序Target - 编译到字节跳动小程序T-weappTarget - 编译到微信小程序Target - 编译到微信小程序V-4Version - 4.xVersion - 4.xbugSomething isn't workingSomething isn't working
Description
Activity
Metadata
Metadata
Assignees
Labels
F-vue3Framework - Vue 3Framework - Vue 3T-alipayTarget - 编译到支付宝小程序Target - 编译到支付宝小程序T-ddT-feishuT-h5Target - 编译到 H5Target - 编译到 H5T-harmonyTarget - 编译到 HarmonyTarget - 编译到 HarmonyT-harmony_hybridTarget - 编译到 Harmony (Hybird 模式)Target - 编译到 Harmony (Hybird 模式)T-jdTarget - 编译到京东小程序Target - 编译到京东小程序T-kwaiT-qqTarget - 编译到 QQ 小程序Target - 编译到 QQ 小程序T-quickappTarget - 编译到快应用Target - 编译到快应用T-qyT-rnTarget - 编译到 React NativeTarget - 编译到 React NativeT-swanTarget - 编译到百度小程序Target - 编译到百度小程序T-ttTarget - 编译到字节跳动小程序Target - 编译到字节跳动小程序T-weappTarget - 编译到微信小程序Target - 编译到微信小程序V-4Version - 4.xVersion - 4.xbugSomething isn't workingSomething isn't working
Type
Projects
- StatusShow more project fieldsTodo
- StatusShow more project fieldsPadding
请先确认
Taro 版本
v4
相关领域
None
使用框架
Vue3
相关平台
小程序基础库版本
No response
问题描述
1、页面src/pages/index/index.vue
<style> .ct-page{ display: block; } </style>样式代码:<style>
.ct-page{
display: block;
}
</style>
2、页面src/pages/list/index.vue
样式代码:
3、因为两个页面有相同样式代码,此时进行命令构建:npm run build:weapp
4、生成时src/pages/index/index.vue无样式文件,如下图:
复现链接
https://github.com/leiming19877/test-taro-style1.git
复现步骤
1、进入工程命令行
2、运行npm run build:weapp
3、查看构建结果
环境信息
xxx@192 test-taro-style1 % npx taro info 👽 Taro v4.2.1 Taro CLI 4.2.1 environment info: System: OS: macOS 26.5.2 Shell: 5.9 - /bin/zsh Binaries: Node: 22.21.0 - /Users/leiming/.nvm/versions/node/v22.21.0/bin/node Yarn: 1.22.22 - /Users/leiming/.nvm/versions/node/v22.21.0/bin/yarn npm: 10.9.4 - /Users/leiming/.nvm/versions/node/v22.21.0/bin/npm npmPackages: @tarojs/cli: 4.2.1 => 4.2.1 @tarojs/components: 4.2.1 => 4.2.1 @tarojs/helper: 4.2.1 => 4.2.1 @tarojs/plugin-framework-vue3: 4.2.1 => 4.2.1 @tarojs/plugin-html: 4.2.1 => 4.2.1 @tarojs/plugin-platform-alipay: 4.2.1 => 4.2.1 @tarojs/plugin-platform-h5: 4.2.1 => 4.2.1 @tarojs/plugin-platform-jd: 4.2.1 => 4.2.1 @tarojs/plugin-platform-qq: 4.2.1 => 4.2.1 @tarojs/plugin-platform-swan: 4.2.1 => 4.2.1 @tarojs/plugin-platform-tt: 4.2.1 => 4.2.1 @tarojs/plugin-platform-weapp: 4.2.1 => 4.2.1 @tarojs/runtime: 4.2.1 => 4.2.1 @tarojs/shared: 4.2.1 => 4.2.1 @tarojs/taro: 4.2.1 => 4.2.1 @tarojs/vite-runner: 4.2.1 => 4.2.1 babel-preset-taro: 4.2.1 => 4.2.1 eslint-config-taro: 4.2.1 => 4.2.1开源贡献