diff --git a/templates/AureliaSpa/ClientApp/boot.ts b/templates/AureliaSpa/ClientApp/boot.ts index 83a813a..e03d3f2 100644 --- a/templates/AureliaSpa/ClientApp/boot.ts +++ b/templates/AureliaSpa/ClientApp/boot.ts @@ -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')); } diff --git a/templates/AureliaSpa/webpack.config.js b/templates/AureliaSpa/webpack.config.js index cd3cc07..dafa58b 100644 --- a/templates/AureliaSpa/webpack.config.js +++ b/templates/AureliaSpa/webpack.config.js @@ -21,6 +21,7 @@ module.exports = { ] }, plugins: [ + new webpack.DefinePlugin({ IS_DEV_BUILD: JSON.stringify(isDevBuild) }), new webpack.DllReferencePlugin({ context: __dirname, manifest: require('./wwwroot/dist/vendor-manifest.json')