Conversation
package.json
Outdated
| "textangular": "1.4.3", | ||
| "ui-select": "0.18.1", | ||
| "underscore": "^1.8.3" | ||
| "lodash": "4.17.2" |
There was a problem hiding this comment.
we just need lodash.debounce, please don't add the entire lodash lib as dep.
reduce the dependency from lodash to lodash.debounce only
src/javascripts/vendors.js
Outdated
| require('ng-file-upload'); | ||
|
|
||
| global._ = require('underscore'); | ||
| global._ = require('lodash'); |
There was a problem hiding this comment.
no, this won't work anymore now that we don't have lodash as dependency
There was a problem hiding this comment.
I know, but adding var debounce = require('lodash.debounce'); into ListLayoutController will right ?
There was a problem hiding this comment.
..actually just tested, and if I reduce this to lodash.debounce, it is ok for the core code of ng-admin but it then make all Restangular interceptor code to fail as specified in the doc... Which was the reason for this change in the first place
So not sure how this should be handled
|
As seen with @Phocea, |
|
Rebased and replaced by #1268 |
As discussed with @fzaninotto, reopening this PR. I have left the original implementation with a global delcared in the vendor.js since this is the solution I tested.
On latest build I am getting the error _.includes is not a function when navigating into one of my custom pages.
Following several threads on Restangular Git (one of them being mgonto/restangular#1225). I found out that Restangular is now compatible with lodash 4.
ng-admin using underscore is causing incompatibilty since the new webpack dependency version has been merged. Making use of lodash fixes the problems