-
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
Resolved : JS files located outside the web/js directory #16582
Resolved : JS files located outside the web/js directory #16582
Conversation
Hi @hitesh-wagento. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
Hi @hitesh-wagento, due to Magento backward-compatible guide we can't move or rename files. |
Hi @hitesh-wagento, |
Hi @hitesh-wagento, |
Hi @ihor-sviziev , @VladimirZaets I have completed changes as per your suggestion please review and let me know if any changes required. Thanks |
Hi, @hitesh-wagento thanks for fixes. Please resolve the branch conflicts. As I see you apply the fix that was provided by @ihor-sviziev
you should to do it for each cases.
also you should add `'Magento_Captcha/captcha': 'Magento_Captcha/js/captcha' |
As per our Slack discussion I have completed changes please review and let me know if any changes required. Thanks |
@@ -123,7 +123,7 @@ | |||
<script type="text/x-magento-init"> | |||
{ | |||
"a[role='back']": { | |||
"Magento_SendFriend/back-event": {} | |||
"Magento_SendFriend/js/back-event": {} |
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.
We need to create mapping between old and new path in requirejs-config.js file in Magento_SendFriend module
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.
Applied changes as per our slack conversion.
Hi @ihor-sviziev, thank you for the review. |
Hi @ihor-sviziev, thank you for the review. |
Hi @ihor-sviziev , @VladimirZaets Any update in this PR ? Thanks |
Hi @hitesh-wagento, |
Hi @hitesh-wagento. Thank you for your contribution. Please, consider to port this solution to 2.3 release line. |
Do I need to create ports for this PR ? Thanks |
Hi @hitesh-wagento, |
@hitesh-wagento You linked to devdocs at the top of this PR. It looks like you changed the code to meet the standards set in the documentation, but I want to verify whether you made any documentable changes. |
Hi @keharper I have changed as per suggested by ihor-sviziev |
Hi @ihor-sviziev, @hitesh-wagento, I'm not sure it's the best of places to address that, but I didn't want to re-open #16302 by adding a comment to it. My issue is it seems the changes seem to be BC under some conditions. For instance, if in a 2.2.5 :
'mageQuickSearch' being there to be referenced as a define() dependency in 'Third_PartyModule/js/form-mini'. Problem: The path mapping is not taken into account, either in blank or luma, in developer or production modes : a 404 error is thrown for ".../Magento_Search/form-mini.js". IF I remove "mageQuickSearch" from the third party requirejs-config.js and replace it in the 'Third_PartyModule/js/form-mini' define() by the native/legacy path 'Magento_Search/form-mini', then it works as expected. Am I missing something or does that mean there is still a risk of BC break across the board ? Regards |
To be introduced in 2.3.x and 2.2.7 With expected BC break in 2.2.x because magento/magento2#16582 does not seem to cover this particular case See issue of origin magento/magento2#16302
Description
Some JS files are direct children of
web
rather thanweb/js
. This does not follow instructions from the dev docs thus is confusing.Fixed Issues (if relevant)
Expected result
web/js
as per the dev docs.Actual result
web
, this is inconsistent with the dev docs.Contribution checklist