Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/480.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 将样式css转换为scss_Javascript_Angular_Typescript_Sass_Angular8 - Fatal编程技术网

Javascript 将样式css转换为scss

Javascript 将样式css转换为scss,javascript,angular,typescript,sass,angular8,Javascript,Angular,Typescript,Sass,Angular8,我正在尝试将当前的angular 8 project style.css转换为sass,但编译器出错 我已尝试手动更改“示意图”:{ “@原理图/角度:组件”:{ “STYLEXT”:“scss” 我想转换样式表。有人能帮我检查一下angular.json,看看这些配置是否存在吗 "schematics": { "@schematics/angular:component": { "style": "scss" } }, "architect": {

我正在尝试将当前的angular 8 project style.css转换为sass,但编译器出错

我已尝试手动更改“示意图”:{ “@原理图/角度:组件”:{ “STYLEXT”:“scss”


我想转换样式表。有人能帮我检查一下angular.json,看看这些配置是否存在吗

"schematics": {
   "@schematics/angular:component": {
        "style": "scss"
     }
    },
"architect": {
    "build": {
        "builder": "@angular-devkit/build-angular:browser",
        "options": {
        "outputPath": "dist/testssss",
        "index": "src/index.html",
        "main": "src/main.ts",
        "polyfills": "src/polyfills.ts",
        "tsConfig": "tsconfig.app.json",
        "aot": false,
        "assets": [
            "src/favicon.ico",
            "src/assets"
        ],
        "styles": [
            "src/styles.scss"
        ],
        "scripts": []
    },

还要确保将css文件更改为scss扩展名

检查angular.json以查看这些配置是否存在

"schematics": {
   "@schematics/angular:component": {
        "style": "scss"
     }
    },
"architect": {
    "build": {
        "builder": "@angular-devkit/build-angular:browser",
        "options": {
        "outputPath": "dist/testssss",
        "index": "src/index.html",
        "main": "src/main.ts",
        "polyfills": "src/polyfills.ts",
        "tsConfig": "tsconfig.app.json",
        "aot": false,
        "assets": [
            "src/favicon.ico",
            "src/assets"
        ],
        "styles": [
            "src/styles.scss"
        ],
        "scripts": []
    },

还要确保将css文件更改为scss扩展名

您能显示详细错误吗?您是否在
angular.json
文件中更改为
src/style.scss
?是的,当我在控制台中执行此操作时,它会出错此=>(./node_modules/@angular devkit/build angular/src/angular cli files/plugins/raw css loader.js./node_modules/postss loader/src??embedded./src/styles.css)您能显示详细的错误吗?您是否在
angular.json
文件中更改为
src/style.scs
?是的,当我这样做时,它在控制台中出错,这个=>(./node_modules/@angular devkit/build angular/src/angular cli files/plugins/raw css loader.js!。/node_modules/postss loader/src??embedded!。/src/styles.css)