angular 6でlessを使用するインスタンスコード
810 ワード
新規プロジェクト
既存のプロジェクト
修正*.cssファイルおよび参照先の接尾辞はlessとangularである.jsonファイルで以下の内容を設定します.
まとめ
以上、angular 6でlessを使用したインスタンスコードをご紹介しましたが、何かご質問があれば、コメントをお待ちしております.
ng new [appname] --style less
既存のプロジェクト
修正*.cssファイルおよび参照先の接尾辞はlessとangularである.jsonファイルで以下の内容を設定します.
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"ngTest": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {
"@schematics/angular:component": {
"styleext": "less"
}
}
......
}
まとめ
以上、angular 6でlessを使用したインスタンスコードをご紹介しましたが、何かご質問があれば、コメントをお待ちしております.