You'd better extend the minicart component. For example:
app/code/vendor/module/view/frontend/requirejs-config.js
var config = {
'config': {
'mixins': {
'Magento_Checkout/js/view/minicart': {
'Vendor_Module/js/checkout/view/minicart': true
}
}
}
};
app/code/vendor/module/view/frontend/web/js/checkout/view/minicart.js
/**
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
define([
], function () {
'use strict';
return function (Component) {
return Component.extend({
/**
* @override
*/
initialize: function () {
var self = this;
return this._super();
},
});
}
});
More info here and study more about jquery ui-components for extra help below:
http://devdocs.magento.com/guides/v2.0/ui-components/ui-component.html
http://devdocs.magento.com/guides/v2.2/ui_comp_guide/bk-ui_comps.html
http://devdocs.magento.com/guides/v2.2/ui_comp_guide/bk-ui_comps.html
rm -rf pub/static/* var/view_preprocessed/*
and flush the cache. You'll need to redeploy static content if you're in production mode.