github.com/ferranbt/nomad@v0.9.3-0.20190607002617-85c449b7667c/ui/ember-cli-build.js (about) 1 /* eslint-env node */ 2 const EmberApp = require('ember-cli/lib/broccoli/ember-app'); 3 4 const environment = EmberApp.env(); 5 const isProd = environment === 'production'; 6 const isTest = environment === 'test'; 7 8 module.exports = function(defaults) { 9 var app = new EmberApp(defaults, { 10 addons: { 11 blacklist: isProd ? ['ember-freestyle'] : [], 12 }, 13 svg: { 14 paths: ['public/images/icons'], 15 optimize: { 16 plugins: [{ removeViewBox: false }], 17 }, 18 }, 19 codemirror: { 20 modes: ['javascript'], 21 }, 22 funnel: { 23 enabled: isProd, 24 exclude: [ 25 `${defaults.project.pkg.name}/components/freestyle/**/*`, 26 `${defaults.project.pkg.name}/templates/components/freestyle/**/*`, 27 ], 28 }, 29 babel: { 30 plugins: ['@babel/plugin-proposal-object-rest-spread'], 31 }, 32 'ember-cli-babel': { 33 includePolyfill: isProd, 34 }, 35 hinting: isTest, 36 tests: isTest, 37 sourcemaps: { 38 enabled: false, 39 }, 40 }); 41 42 // Use `app.import` to add additional libraries to the generated 43 // output files. 44 // 45 // If you need to use different assets in different 46 // environments, specify an object as the first parameter. That 47 // object's keys should be the environment name and the values 48 // should be the asset to use in that environment. 49 // 50 // If the library that you are including contains AMD or ES6 51 // modules that you would like to import into your application 52 // please specify an object with the list of modules as keys 53 // along with the exports of each module as its value. 54 55 return app.toTree(); 56 };