Exclude jQuery from vendor.js in ember-cli

Is it possible to eliminate jQuery dependency on vendor.js in ember-cli when creating production-only? I want to enable it separately on my site.

+7
ember-cli
source share
3 answers

In the end, the only thing that worked for me was the following:

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

This excludes it during the production process, but not in development.

+1
source share

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

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

For more information, see Configure an embedded resource .

+12
source share

This is a pretty simple question, check the bower.json file in your directory and delete the jquery entry or just run bower uninstall jquery --save in cli.

Oups skipped only in production, well, you can save it as a dev dependency so that it is not included in the assembly. So uninstall jquery and then run bower install --save-dev jquery

-one
source share

All Articles