mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-24 02:30:13 +00:00
In AureliaSpa, use Webpack build mode to decide whether or not to enable debug logging
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
import { Aurelia } from 'aurelia-framework';
|
||||
import 'bootstrap/dist/css/bootstrap.css';
|
||||
import 'bootstrap';
|
||||
declare const IS_DEV_BUILD: boolean; // The value is supplied by Webpack during the build
|
||||
|
||||
export function configure(aurelia: Aurelia) {
|
||||
aurelia.use.standardConfiguration();
|
||||
if (window.location.host.includes('localhost')) {
|
||||
|
||||
if (IS_DEV_BUILD) {
|
||||
aurelia.use.developmentLogging();
|
||||
}
|
||||
|
||||
aurelia.start().then(() => aurelia.setRoot('app/components/app/app'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user