-
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
zxcvbn.js included in merged.js #14357
Comments
@cannycookie, thank you for your report. |
Afaik this is part of login and others things which use it for calculating the password strength. You should be able to remove the js file according to the docs. |
I did some testing and I was not able to remove the file as it is merged via require js config. When merging is disabled, all works fine, yet when merging is enabled, the library is included on all pages. |
You have to explicitely exclude it from bundling (which is done with all files which are loaded with requireJS): https://devdocs.magento.com/guides/v2.2/frontend-dev-guide/themes/js-bundling.html See https://github.com/magento/magento2/blob/c896f2c07c4bf61481aad75bab2467832594b546/app/design/frontend/Magento/blank/etc/view.xml for reference. |
Hi, It seems that excluding via the view.xml file only works for directories. We copied the exclude node from the Blank theme to our custom theme, but the libraries are still in the bundled+merged+minified js. For example:
Are still in the bundled javascript. This is on Magento 2.2.5. Anyone else experiencing this? |
Adding this to the exclude list in view.xml gets rid of moment-timezone-with-data.min.js
and adding
gets rid of zxcvbn (note including the .min. |
Based on the https://devdocs.magento.com/guides/v2.2/performance-best-practices/configuration.html#bundling-tips documentation, I disabled merging. Only minify + bundling is enabled. The zxcvbn (with min) worked for me. The timezone data without did not. I included .min in the exclude and it worked. Same with So I assumed, adding .min. will fix this for several js files, but.. Blank luma theme adds this: |
Hi @cannycookie! |
Please, reopen this issue with more details if it still occurs. |
Hi @cannycookie. Thank you for your report. The fix will be available with the upcoming 2.3.4 release. |
zxcvbn.js is not included in our theme, but when js bundling and merging is enabled this 850Kb file is added to the merged script.
Preconditions
Steps to reproduce
passwordStrengthIndicator: 'Magento_Customer/js/password-strength-indicator', zxcvbn: 'Magento_Customer/js/zxcvbn',
Expected result
Actual result
The text was updated successfully, but these errors were encountered: