Skip to content

Commit

Permalink
fix: missing style in production
Browse files Browse the repository at this point in the history
fix #16
  • Loading branch information
SettingDust committed Apr 9, 2022
1 parent 2ce0433 commit c7e976c
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 30 deletions.
10 changes: 9 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"sourceMap": true,
"styles": [
"node_modules/@taiga-ui/core/styles/taiga-ui-global.less",
"node_modules/@taiga-ui/core/styles/taiga-ui-theme.less",
Expand All @@ -66,6 +67,14 @@
},
"configurations": {
"production": {
"optimization": {
"scripts": true,
"styles": {
"minify": true,
"inlineCritical": false
},
"fonts": true
},
"budgets": [
{
"type": "initial",
Expand All @@ -91,7 +100,6 @@
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
Expand Down
15 changes: 0 additions & 15 deletions src/app/options/options.component.scss
Original file line number Diff line number Diff line change
@@ -1,15 +0,0 @@
#options {
table {
width: 100%;

.action-column {
& > .wrapper {
display: flex;

& > * {
width: 100%;
}
}
}
}
}
3 changes: 2 additions & 1 deletion src/app/options/options.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ import { Component } from '@angular/core'
templateUrl: './options.component.html',
styleUrls: ['./options.component.scss']
})
export class OptionsComponent {}
export class OptionsComponent {
}
2 changes: 1 addition & 1 deletion src/app/options/rules/rules.component.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
app-rules {
:host {
.inputs {
display: grid;
grid-template-columns: repeat(5, 1fr);
Expand Down
5 changes: 2 additions & 3 deletions src/app/options/rules/rules.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, OnInit, ViewEncapsulation } from '@angular/core'
import { Component, OnInit } from '@angular/core'
import { from, pluck } from 'rxjs'
import { BrowserService } from '../../browser.service'
import { AbstractControl, FormArray, FormBuilder } from '@angular/forms'
Expand All @@ -10,8 +10,7 @@ import defaultTemplate from '../../../assets/default.template'
@Component({
selector: 'app-rules',
templateUrl: './rules.component.html',
styleUrls: ['./rules.component.scss'],
encapsulation: ViewEncapsulation.None
styleUrls: ['./rules.component.scss']
})
export class RulesComponent implements OnInit {
form = this.fb.group({
Expand Down
4 changes: 2 additions & 2 deletions src/app/options/shortcuts/shortcuts.component.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#options {
:host {
table {
width: 100%;

.action-column {
& > .wrapper {
& > ::ng-deep .wrapper {
display: flex;

& > * {
Expand Down
5 changes: 2 additions & 3 deletions src/app/options/shortcuts/shortcuts.component.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { Component, ViewEncapsulation } from '@angular/core'
import { Component } from '@angular/core'
import { AbstractControl, FormArray, FormBuilder, Validators } from '@angular/forms'
import { concat, from, of } from 'rxjs'
import { map, switchMap, tap } from 'rxjs/operators'

@Component({
selector: 'app-shortcuts',
templateUrl: './shortcuts.component.html',
styleUrls: ['./shortcuts.component.scss'],
encapsulation: ViewEncapsulation.None
styleUrls: ['./shortcuts.component.scss']
})
export class ShortcutsComponent {
required = ['hotkey']
Expand Down
6 changes: 2 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { enableProdMode, ViewEncapsulation } from '@angular/core'
import { enableProdMode } from '@angular/core'
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'

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

platformBrowserDynamic()
.bootstrapModule(AppModule, {
defaultEncapsulation: ViewEncapsulation.None
})
.bootstrapModule(AppModule)
.catch((err) => console.error(err))

0 comments on commit c7e976c

Please sign in to comment.