-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move blank theme dependencies out of Magento_Theme requirejs-config #8982
Move blank theme dependencies out of Magento_Theme requirejs-config #8982
Conversation
@@ -0,0 +1,11 @@ | |||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say that adding requirejs-config.js
at theme root should be considered as anti-pattern and Magento core shouldn't promote it, b/c it's against "everything is a module" aproach.
By default this config file is stored in Theme
module of Magento
vendor, so following files structure, it should be added as app/design/frontend/Magento/blank/Magento_Theme/requirejs-config.js
and JS files should be moved from app/design/frontend/Magento/blank/web/js
to app/design/frontend/Magento/blank/Magento_Theme/web/js
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point and I agree with you. I've updated the code and tested it.
Thanks :)
…irejs-config #8982 - fixed static test
…irejs-config #8982 - fixed static test
@mikeoloughlin thank you for your contribution! |
Description
Creating a new theme that does not fallback to the blank theme causes two files to 404 because Magento_Theme module depends on blank theme assets
js/theme.js
andjs/responsive.js
Fixed Issues (if relevant)
Reproduce bug:
Manual testing steps:
theme.js
orresponsive.js
theme.js
andresponsive.js