I've started to use magento 2.2.2 and I've noticed that running static content deploy for a specific theme (using -t flag) is no more working. All themes are deployed instead of the requested one only. Am I wrong or is a M2.2 issue?
2 Answers 2
Yes,you can do static content deploy to specific theme.
php bin/magento setup:static-content:deploy --theme {yourTheme}
Example if you want static content deploy for luma theme then use
php bin/magento setup:static-content:deploy --theme Magento/luma
If you want to do static content deploy at developer/default mode then you need to add suffix -f
php bin/magento setup:static-content:deploy --theme {yourTheme} -f
-
I never tried with --theme. I always used -t that in M2.1 was perfectly runningDaniele Rovatti– Daniele Rovatti2018年04月16日 19:00:10 +00:00Commented Apr 16, 2018 at 19:00
-
try it.i will work2018年04月16日 19:01:34 +00:00Commented Apr 16, 2018 at 19:01
Static Content Deploy For Magento Backend Theme Using Command Line (Working on 2.1.1 or later)
php bin/magento setup:static-content:deploy --theme="Magento/backend"
Static Content Deploy For Specific Themes Using Command Line (Working on 2.1.1 or later)
php bin/magento setup:static-content:deploy --theme Magento/luma --theme Magento/second_theme
Exclude Themes on Static Content Deploy and does not minify HTML files Using Command Line (Working on 2.1.1 or later)
php bin/magento setup:static-content:deploy en_US --exclude-theme Magento/luma --no-html-minify
-
@DanieleRovatti You can accept answer if it's useful for you. So, other user can use this answer for solve query.Rohan Hapani– Rohan Hapani2018年04月16日 19:24:55 +00:00Commented Apr 16, 2018 at 19:24
Explore related questions
See similar questions with these tags.