magento - How to properly override a core JS file in Magento2 -
we attempting override behavior of bundle products in magento2, specifically, enable user defined quantities checkbox type products within bundle.
we have written extension, , followed instructions how replace default js component found here: http://devdocs.magento.com/guides/v2.0/javascript-dev-guide/javascript/custom_js.html
our requirejs-config.js within our extension's frontend (app/code/endertech/bundleextended/view/frontend/) view looks like:
var config = { "map": { "*": { 'magento_bundle/js/price-bundle': "endertech_bundleextended/js/price-bundle" } } };
this having effect of loading both core magento2 price-bundle.js , our modified version... , customization we've added our modified version not executing... presumably because magento2 core version loading first.
we expected revision prevent core version loading in favor of ours.
perhaps approaching problem wrong direction, or have other misunderstanding.
we seeking solution have our modified price-bundle.js loaded in lieu of built-in comes in magento bundle module... or @ least way override specific methods within , required here (vendor/magento/module-bundle/view/frontend/requirejs-config.js).
if our approach wrong, we'd happy corrected!