Javascript 将样式css转换为scss
我正在尝试将当前的angular 8 project style.css转换为sass,但编译器出错 我已尝试手动更改“示意图”:{ “@原理图/角度:组件”:{ “STYLEXT”:“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.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)