Skip to content

Prevent RequireJS from adding .min.js suffix to external files #25869

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

Merged

Conversation

krzksz
Copy link
Contributor

@krzksz krzksz commented Dec 1, 2019

Description (*)

This commit adds and additional check if file belongs to current base URL before setting min.js suffix.

Fixed Issues (if relevant)

  1. RequireJs is not resolving CDN path for some js files #25690: RequireJs is not resolving CDN path for some js files

Manual testing scenarios (*)

  1. Enable JavaScript minification in admin panel.
  2. In developer console execute require(['https://magento.com/test.js'], console.log);.
  3. In network tab verify that the request was made for test.js and not for test.min.js.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@krzksz krzksz requested a review from DrewML as a code owner December 1, 2019 19:30
@m2-assistant
Copy link

m2-assistant bot commented Dec 1, 2019

Hi @krzksz. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@krzksz krzksz force-pushed the base-url-min-resolve branch from f84b5b1 to 23f0ced Compare December 2, 2019 07:05
@dmytro-ch dmytro-ch self-assigned this Dec 2, 2019
@magento-engcom-team
Copy link
Contributor

Hi @dmytro-ch, thank you for the review.
ENGCOM-6382 has been created to process this Pull Request

@engcom-Bravo
Copy link
Contributor

✔️ QA Passed

@m2-assistant
Copy link

m2-assistant bot commented Dec 4, 2019

Hi @krzksz, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants