diff --git a/src/client/main.web.prod.ts b/src/client/main.web.prod.ts index eba2dc186ae6213cf804b8d8a846fdd3bd4ba025..f6ed21afad63a23f2afa9a971aaab3275c05abf2 100644 --- a/src/client/main.web.prod.ts +++ b/src/client/main.web.prod.ts @@ -7,7 +7,9 @@ import { platformBrowser } from '@angular/platform-browser'; import { WebModuleNgFactory } from './web.module.ngfactory'; -enableProdMode(); +if (String('<%= ENV %>') === 'prod' || String('<%= TARGET_DESKTOP_BUILD %>') === 'true') { + enableProdMode(); +} platformBrowser().bootstrapModuleFactory(WebModuleNgFactory); diff --git a/tools/config/seed.config.ts b/tools/config/seed.config.ts index dfc47a5555b534bccaef338c2b89be2d55393753..686a75aeb0a4dddd8ede8cd5f45874c23cb69600 100644 --- a/tools/config/seed.config.ts +++ b/tools/config/seed.config.ts @@ -490,10 +490,26 @@ export class SeedConfig { */ 'browser-sync': { middleware: [require('connect-history-api-fallback')({ - index: `${this.APP_BASE}index.html` - // parent angular2-seed uses the following however they don't work here - // rewrites: this.DEV_REWRITE_RULES, - // disableDotRule: true + index: `${this.APP_BASE}index.html`, +// rewrites: [ +// { +// from: /^\/node_modules\/.*$/, +// to: (context:any) => context.parsedUrl.pathname +// }, +// { +// from: new RegExp(`^${this.APP_BASE}${this.APP_SRC}$`), +// to: (context:any) => context.parsedUrl.pathname +// }, +// { +// from: /^\/assets\/.*$/, +// to: (context:any) => context.parsedUrl.pathname +// }, +// { +// from: /^\/css\/.*$/, +// to: (context:any) => context.parsedUrl.pathname +// } +// ], +// disableDotRule: true })], port: this.PORT, startPath: this.APP_BASE,