Static content is deploying for disabled modules #24666
Closed
Description
Summary (*)
- Original summary from the reporter :
I disable module output for several modules (e.g Checkout, GiftRegestry) and would like to know how to exclude CSS related to these modules from styles-l/styles-m files? As I don't need to load extra CSS
Preconditions (*)
- reproduced on
2.3-develop
Steps to reproduce (*)
- Setup vanilla 2.3-develop installation
- Take a look at the file
app/design/frontend/Magento/blank/Magento_Braintree/web/css/source/_module.less
, notice the selector.payment-method-braintree
is in there and also notice this selector is in no other file in the Magento source code except for this file in theMagento_Braintree
module in the
Magento/Blank
theme. - Now disable that module (and its dependency):
bin/magento module:disable Magento_Braintree Magento_BraintreeGraphQl
- Remove potential left over files:
rm -R var/view_preprocessed/* pub/static/*
- Run static content deploy:
bin/magento setup:static-content:deploy -f --theme Magento/blank en_US
- Look at the generated file
pub/static/frontend/Magento/blank/en_US/css/styles-m.css
Expected result (*)
- Not finding a reference to the selector
.payment-method-braintree
Actual result (*)
- Finding references to the selector
.payment-method-braintree
Update: In hindsight, @shkodasv is talking about the deprecated "disabling module output" feature of Magento which was removed in Magento 2.2 I believe. But the issue is still valid for disabled modules as well, or should we open a new issue then?
Metadata
Assignees
Labels
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentA defect with this priority could have functionality issues which are not to expectations.The issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.4-develop branchMajor restrictions or short-term circumventions are required until a fix is available.Has been reviewed and prioritized during Triage with Product Managers
Type
Projects
Status
Done