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

add note on minification #124

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,35 @@ found in both `node_modules` and `bower_components`.

Now you should be ready to deploy.

See also the note on [Javascript minification](#javascript-minification)

## Javascript minification

When precompiling assets in production, you will probably want to
ensure that you are not minifying your javascript twice, in EmberCLI
and in Rails. This can slow down assets precompilation considerably.

There are two ways to do this. You can disable minification in Ember
by modifying your `ember-cli-build.js` as follows:

```javascript
var app = new EmberApp({
...
minifyJS: false,
...
}
```

or you can disable minification in Rails by setting:

```ruby
config.assets.js_compressor = nil
```

in your `config/environments/production.rb` file. Either method has
trade-offs, but you do not want to do both.


## Additional Information

When running in the development environment, EmberCLI Rails runs `ember build`
Expand Down