github.com/adityamillind98/nomad@v0.11.8/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 svg: { 11 paths: ['node_modules/@hashicorp/structure-icons/dist', 'public/images/icons'], 12 optimize: { 13 plugins: [{ removeViewBox: false }], 14 }, 15 }, 16 codemirror: { 17 modes: ['javascript'], 18 }, 19 babel: { 20 plugins: ['@babel/plugin-proposal-object-rest-spread'], 21 }, 22 'ember-cli-babel': { 23 includePolyfill: isProd, 24 }, 25 hinting: isTest, 26 tests: isTest, 27 sourcemaps: { 28 enabled: false, 29 }, 30 }); 31 32 // Use `app.import` to add additional libraries to the generated 33 // output files. 34 // 35 // If you need to use different assets in different 36 // environments, specify an object as the first parameter. That 37 // object's keys should be the environment name and the values 38 // should be the asset to use in that environment. 39 // 40 // If the library that you are including contains AMD or ES6 41 // modules that you would like to import into your application 42 // please specify an object with the list of modules as keys 43 // along with the exports of each module as its value. 44 45 app.import('node_modules/xterm/css/xterm.css'); 46 // Issue to move to typical package.json import when released: https://github.com/hashicorp/nomad/issues/7461 47 app.import('vendor/xterm.js', { 48 using: [ 49 { transformation: 'amd', as: 'xterm-vendor' }, 50 ], 51 }); 52 53 return app.toTree(); 54 };