mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 11:47:22 +02:00
breaking: reduce nodebb.min.js size by around 800kb
const zxcvbn = require('zxcvbn');
bundles a huge amount of code, now it won't be in nodebb.min.js
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
|
||||
define('forum/reset_code', ['alerts'], function (alerts) {
|
||||
define('forum/reset_code', ['alerts', 'zxcvbn'], function (alerts, zxcvbn) {
|
||||
const ResetCode = {};
|
||||
|
||||
ResetCode.init = function () {
|
||||
@@ -13,7 +13,7 @@ define('forum/reset_code', ['alerts'], function (alerts) {
|
||||
|
||||
resetEl.on('click', function () {
|
||||
try {
|
||||
utils.assertPasswordValidity(password.val());
|
||||
utils.assertPasswordValidity(password.val(), zxcvbn);
|
||||
|
||||
if (password.val() !== repeat.val()) {
|
||||
throw new Error('[[reset_password:passwords_do_not_match]]');
|
||||
|
||||
Reference in New Issue
Block a user