如何在NativeScript-Vue中使用外部scss文件

问题描述 投票:0回答:1

我想在Nativescript-Vue文件中使用2个外部文件。

它们位于以下目录/app/styles/_variables.sccs/app/styles/generalStyles.scss中。

我在_variables.sccs中导入了generalStyles.sccs

但是当我想在我的Vue文件中导入generalStyles.sccs时,出现以下错误:

SassError:找不到导入文件或不可读:样式/ generalStyles。在app / components / Select / StationSelect.vue的第277行上]

@@ import“ styles / generalStyles”;

StationSelect.vue看起来像这样

<style lang="scss" scoped>

    @import "styles/generalStyles";

    .routeDetailsChoice,
    .timeDetails{
        Label,
        TextField{

            .ns-dark &{
                color: $white;
            }
        }
    }
</style>

我还有以下软件包:

"nativescript-vue": "2.4.0",
"node-sass": "^4.13.0",
"sass-loader": "^8.0.1",
"style-loader": "^1.1.3",

我想在我的Nativescript-Vue文件中使用2个外部。它们位于以下目录/app/styles/_variables.sccs和/app/styles/generalStyles.scss中。我在...

vue.js sass nativescript-vue
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.