UI - Non-prod CSS sourcemaps (#4418)
This commit is contained in:
parent
0b775e1645
commit
2dda5a7da3
|
@ -2,7 +2,19 @@
|
||||||
|
|
||||||
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
|
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
|
||||||
module.exports = function(defaults) {
|
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': {
|
'ember-cli-babel': {
|
||||||
includePolyfill: true
|
includePolyfill: true
|
||||||
},
|
},
|
||||||
|
@ -22,7 +34,11 @@ module.exports = function(defaults) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'sassOptions': {
|
||||||
|
sourceMapEmbed: sourcemaps,
|
||||||
|
},
|
||||||
'autoprefixer': {
|
'autoprefixer': {
|
||||||
|
sourcemap: sourcemaps,
|
||||||
grid: true,
|
grid: true,
|
||||||
browsers: [
|
browsers: [
|
||||||
"defaults",
|
"defaults",
|
||||||
|
|
Loading…
Reference in a new issue