I've been looking over the Magento 2 Docs for using custom JS and have been trying to add a modified version of 'configurable':'Magento_ConfigurableProduct/js/configurable' to my theme directory so that I can treat the drop downs for product sizes differently than other drop downs.

I've created a requirejs.config.js file in the root of my theme directory with the following:

var config = {
    "map": {
        "*": {

I've then copied vendor/magento/module-configurable-product/view/frontend/web/js/configurable.js to my themes Magento_ConfigurableProduct/web/js directory and added a alert to the _fillSelect method. However it doesn't seem to be taking effect.

I've run a deploy and cache clear and the file does show up in the pub/static directory correctly, however I can;t work out why this file is not being used in place of the old one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.