Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to support newest versions of Ember #31

Open
ghost opened this issue Apr 19, 2016 · 5 comments
Open

Update to support newest versions of Ember #31

ghost opened this issue Apr 19, 2016 · 5 comments

Comments

@ghost
Copy link

ghost commented Apr 19, 2016

The newest versions of Ember have altered the way legacyFilesToAppend works. This affects exclude_ember_deps.

Currently, this addon does not work with EmberCLI 2.4.1 or higher.
https://github.com/ember-cli/ember-cli/releases/tag/v2.4.1

@ihoka
Copy link

ihoka commented Apr 22, 2016

As a workaround, you can edit your ember app's ember-cli-build.js file, and splice out the files. e.g. here is how you would exclude jQuery from the ember-cli build:

  // remove jQuery from build because it is already loaded by Rails
  var vendor = app._scriptOutputFiles['/assets/vendor.js'];
  var index = vendor.indexOf('bower_components/jquery/dist/jquery.js');
  if (index > 0) {
    vendor.splice(index, 1);
  }

@ghost
Copy link
Author

ghost commented Apr 28, 2016

This worked for me after updating to the latest ember-cli and ember (2.5.x)

@nruth
Copy link

nruth commented May 2, 2016

Does this only affect exclude_ember_deps or break the addon entirely? What about apps that don't use that feature?

@pwim
Copy link

pwim commented Jan 17, 2017

The disadvantage of @ihoka's workaround is that it nukes jquery entirely from your ember application, meaning it will break your ember-cli tests.

I've discovered that ember-cli actually supports excluding a specific asset, so I'm not sure exclude_ember_deps is needed.

To get my app to work, I customized my ember-cli-build.js with the following to exclude jquery:

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

Unless I'm missing a use case, I'd suggest removing exclude_ember_deps from ember-cli-rails. Thoughts @seanpdoyle?

@seanpdoyle
Copy link
Collaborator

Unless I'm missing a use case, I'd suggest removing exclude_ember_deps from ember-cli-rails.

I'm in favor of this.

I'll investigate when I have some free cycles (PRs welcome!).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants