webpack: Move zxcvbn.js to webpack bundle.

This commit is contained in:
Mehanig 2017-05-24 16:32:27 -07:00 committed by Tim Abbott
parent ae29d4b8d2
commit 04626acd5a
5 changed files with 6 additions and 11 deletions

View File

@ -8,7 +8,7 @@ Form is validated both client-side using jquery-validate (see signup.js) and ser
{% block customhead %}
{{ super() }}
{{ minified_js('zxcvbn')|safe }}
{{ render_bundle('zxcvbn') }}
{% endblock %}
{% block portico_content %}

View File

@ -1,7 +1,7 @@
{% extends "zerver/portico_signup.html" %}
{% block customhead %}
{{ super() }}
{{ minified_js('zxcvbn')|safe }}
{{ render_bundle('zxcvbn') }}
{% endblock %}
{% block portico_content %}

View File

@ -3,5 +3,6 @@
"api": "./static/js/portico/api.js",
"katex": ["./node_modules/katex/dist/katex.min.js"],
"landing-page": "./static/js/portico/landing-page.js",
"translations": "./static/js/translations.js"
"translations": "./static/js/translations.js",
"zxcvbn": "./node_modules/zxcvbn/dist/zxcvbn.js"
}

View File

@ -27,9 +27,10 @@ module.exports = {
// Uses script-loader on minified files so we don't change global variables in them.
// Also has the effect of making processing these files fast
{
test: /(min)\.js/,
test: /(min|zxcvbn)\.js/,
use: [ 'script-loader' ],
},
],
},
output: {

View File

@ -828,13 +828,6 @@ JS_SPECS = {
],
'output_filename': 'min/signup.js'
},
'zxcvbn': {
'source_filenames': [],
'minifed_source_filenames': [
'node_modules/zxcvbn/dist/zxcvbn.js',
],
'output_filename': 'min/zxcvbn.js'
},
'app_debug': {
'source_filenames': ['js/debug.js'],
'output_filename': 'min/app_debug.js'