@breakingrobot do you see any problem if instead of adding the plugin just after $axios we just push it at the end of plugins array and let the user choose the order? Why did you do this particular trick?
- // ...add plugin just after $axios- const index = this.options.plugins.findIndex(p =>- /axios\.js$/.test(p.src || p)- )- this.options.plugins.splice(index + 1, 0, join(this.options.buildDir, dst))+ // just push the plugin at the end+ this.options.plugins.push(join(this.options.buildDir, dst))
@mathieutu But we can't add it to the end. Users may provide plugins to extend auth too (just like axios) (thus depend on it). BTW Why don't use top-level axios configuration? If it is just to prevent users confusing we may remove auto axios import.
Update: now auth uses plugins.push and instead has a plugins option to allow extending.