Skip to content

Commit c7e976c

Browse files
committed
fix: missing style in production
fix #16
1 parent 2ce0433 commit c7e976c

File tree

8 files changed

+20
-30
lines changed

8 files changed

+20
-30
lines changed

angular.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"polyfills": "src/polyfills.ts",
4848
"tsConfig": "tsconfig.app.json",
4949
"inlineStyleLanguage": "scss",
50+
"sourceMap": true,
5051
"styles": [
5152
"node_modules/@taiga-ui/core/styles/taiga-ui-global.less",
5253
"node_modules/@taiga-ui/core/styles/taiga-ui-theme.less",
@@ -66,6 +67,14 @@
6667
},
6768
"configurations": {
6869
"production": {
70+
"optimization": {
71+
"scripts": true,
72+
"styles": {
73+
"minify": true,
74+
"inlineCritical": false
75+
},
76+
"fonts": true
77+
},
6978
"budgets": [
7079
{
7180
"type": "initial",
@@ -91,7 +100,6 @@
91100
"optimization": false,
92101
"vendorChunk": true,
93102
"extractLicenses": false,
94-
"sourceMap": true,
95103
"namedChunks": true
96104
}
97105
},
Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +0,0 @@
1-
#options {
2-
table {
3-
width: 100%;
4-
5-
.action-column {
6-
& > .wrapper {
7-
display: flex;
8-
9-
& > * {
10-
width: 100%;
11-
}
12-
}
13-
}
14-
}
15-
}

src/app/options/options.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ import { Component } from '@angular/core'
55
templateUrl: './options.component.html',
66
styleUrls: ['./options.component.scss']
77
})
8-
export class OptionsComponent {}
8+
export class OptionsComponent {
9+
}

src/app/options/rules/rules.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
app-rules {
1+
:host {
22
.inputs {
33
display: grid;
44
grid-template-columns: repeat(5, 1fr);

src/app/options/rules/rules.component.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, OnInit, ViewEncapsulation } from '@angular/core'
1+
import { Component, OnInit } from '@angular/core'
22
import { from, pluck } from 'rxjs'
33
import { BrowserService } from '../../browser.service'
44
import { AbstractControl, FormArray, FormBuilder } from '@angular/forms'
@@ -10,8 +10,7 @@ import defaultTemplate from '../../../assets/default.template'
1010
@Component({
1111
selector: 'app-rules',
1212
templateUrl: './rules.component.html',
13-
styleUrls: ['./rules.component.scss'],
14-
encapsulation: ViewEncapsulation.None
13+
styleUrls: ['./rules.component.scss']
1514
})
1615
export class RulesComponent implements OnInit {
1716
form = this.fb.group({

src/app/options/shortcuts/shortcuts.component.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#options {
1+
:host {
22
table {
33
width: 100%;
44

55
.action-column {
6-
& > .wrapper {
6+
& > ::ng-deep .wrapper {
77
display: flex;
88

99
& > * {

src/app/options/shortcuts/shortcuts.component.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
import { Component, ViewEncapsulation } from '@angular/core'
1+
import { Component } from '@angular/core'
22
import { AbstractControl, FormArray, FormBuilder, Validators } from '@angular/forms'
33
import { concat, from, of } from 'rxjs'
44
import { map, switchMap, tap } from 'rxjs/operators'
55

66
@Component({
77
selector: 'app-shortcuts',
88
templateUrl: './shortcuts.component.html',
9-
styleUrls: ['./shortcuts.component.scss'],
10-
encapsulation: ViewEncapsulation.None
9+
styleUrls: ['./shortcuts.component.scss']
1110
})
1211
export class ShortcutsComponent {
1312
required = ['hotkey']

src/main.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { enableProdMode, ViewEncapsulation } from '@angular/core'
1+
import { enableProdMode } from '@angular/core'
22
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
33

44
import { AppModule } from './app/app.module'
@@ -9,7 +9,5 @@ if (environment.production) {
99
}
1010

1111
platformBrowserDynamic()
12-
.bootstrapModule(AppModule, {
13-
defaultEncapsulation: ViewEncapsulation.None
14-
})
12+
.bootstrapModule(AppModule)
1513
.catch((err) => console.error(err))

0 commit comments

Comments
 (0)