【发布时间】:2021-11-06 19:42:35
【问题描述】:
例如,我在app.scss 中导入了 bootstrap,
@import "bootstrap/scss/functions";
@import "bootstrap/scss/variables";
@import "bootstrap/scss/mixins";
@import "bootstrap/scss/bootstrap.scss";
如果我这样做的话,现在在一个组件中,
<style scoped lang="scss">
.text {
@extend .text-white;
}
</style>
我收到以下错误,
[plugin:vite:css] The target selector was not found.
Use "@extend .text-white !optional" to avoid this error.
╷
8 │ @extend .text-white;
│ ^^^^^^^^^^^^^^^^^^^
╵
src/components/Navbar.vue 8:3 root stylesheet
【问题讨论】: