Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exclude jQuery from vendor.js in ember-cli

Is it possible to exclude jQuery dependency from vendor.js in ember-cli when building for production only? I want to include it separately in my site.

like image 431
Akis Avatar asked Apr 27 '15 17:04

Akis


2 Answers

You can control which files will be used in development or production using a hash like configuration. In your case you should use:

var app = new EmberApp({
  vendorFiles: {
    'jquery.js': {
      development: 'bower_components/jquery/dist/jquery.js',
      production: false
    }
  }
});

Refer to Customizing a built-in asset section for further info.

like image 140
Marcio Junior Avatar answered Nov 13 '22 07:11

Marcio Junior


At the end the only thing worked for me was this:

var app = new EmberApp({
 vendorFiles: {
    production: false,
    development: 'bower_components/jquery/dist/jquery.js'
  }
});

This will exclude it in production but not in development.

like image 43
Akis Avatar answered Nov 13 '22 05:11

Akis