From 45d85542a9762667876786fbc2d26d69e796ce1a Mon Sep 17 00:00:00 2001 From: John Cowen Date: Mon, 30 Jul 2018 17:53:14 +0100 Subject: [PATCH] UI - Non-prod CSS sourcemaps (#4418) --- ui-v2/ember-cli-build.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/ui-v2/ember-cli-build.js b/ui-v2/ember-cli-build.js index a0254114c6..f1a9b6d143 100644 --- a/ui-v2/ember-cli-build.js +++ b/ui-v2/ember-cli-build.js @@ -2,7 +2,19 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); module.exports = function(defaults) { - let app = new EmberApp(defaults, { + const env = EmberApp.env(); + const prodlike = ['production', 'staging']; + const isProd = env === 'production'; + const isProdLike = prodlike.indexOf(env) > -1; + const sourcemaps = !isProd; + let app = new EmberApp( + Object.assign( + {}, + defaults, + { + productionEnvironments: prodlike + } + ), { 'ember-cli-babel': { includePolyfill: true }, @@ -22,7 +34,11 @@ module.exports = function(defaults) { }, }, }, + 'sassOptions': { + sourceMapEmbed: sourcemaps, + }, 'autoprefixer': { + sourcemap: sourcemaps, grid: true, browsers: [ "defaults",