vite
vite copied to clipboard
多页项目dev正常,build后自定义样式优先级低于框架样式
Describe the bug
build: { rollupOptions: { input: { alarm: path.resolve(__dirname, 'alarm.html'), pass: path.resolve(__dirname, 'pass.html'), facility: path.resolve(__dirname, 'facility-service-system.html') } } },
开发模式正常,build后:
<link rel="modulepreload" href="./assets/common.edbf0978.js">
<link rel="modulepreload" href="./assets/vendor.500d549a.js">
<link rel="modulepreload" href="./assets/dictionary.1a017a0b.js">
<link rel="modulepreload" href="./assets/utils.1eb921be.js">
<link rel="stylesheet" href="./assets/common.9d3a84ec.css"> //这个自定义样式优先级降低了
<link rel="stylesheet" href="./assets/vendor.580fc93b.css"> //框架样式优先级提高了
<link rel="stylesheet" href="./assets/alarm.0dd66d57.css">
Reproduction
https://codesandbox.io/s/distracted-bhabha-wckp4t
System Info
System:
OS: Windows 10 10.0.19044
CPU: (6) x64 Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz
Memory: 3.04 GB / 15.89 GB
Binaries:
Node: 16.13.1 - D:\nodejs16.13.1\node.EXE
npm: 8.1.2 - D:\nodejs16.13.1\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (98.0.1108.62)
Internet Explorer: 11.0.19041.1202
Used Package Manager
npm
Logs
No response
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- [X] The provided reproduction is a minimal reproducible example of the bug.
Please provide a minimal reproduction to reproduce the issue.
Hello @YangJianFei. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with need reproduction
will be closed if they have no activity within 3 days.
@ydcjeff 更新了
同样遇到类似情况,dev模式正常 prod打包后异常 ant 的 select group组件,打包后下拉option被遮挡,手动提升z-index才解决
这么说来我也遇到过,还以为是自己哪里写错了害
Duplicate of #6375