Skip to content
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

Async load zxcvbn.js to use with ember-cli-password-strength #1662

Open
2 tasks
begedin opened this issue Dec 27, 2017 · 0 comments
Open
2 tasks

Async load zxcvbn.js to use with ember-cli-password-strength #1662

begedin opened this issue Dec 27, 2017 · 0 comments

Comments

@begedin
Copy link
Contributor

begedin commented Dec 27, 2017

Problem

ember-cli-password-strength, since 2.0.0, has support for asynchronous loading of the zxcvbn.js library.

Since the library is 400k gzipped, it would make sense for us to make use of this.

However, the addon does not provide a framework to actually include the library as part of the project. Instead, it assumes, if aync mode is on, that the library is locaded at ${config.rootUrl}/zxcvbn.js

We need to find a way to deal with this and switch to async mode.

Subtasks

  • Turn on async mode for the addon as per instructions, by modifying the app's ember-cli-build.js and adding
let app = new EmberAddon(defaults, {
  'ember-cli-password-strength': {
    bundleZxcvbn: false
  }
});
  • Provide the library, either at the expected path, or, more likely at our own path, by providing custom async loading facilities, similar to what we do with ember-stripe-elements

https://github.com/code-corps/ember-stripe-elements/blob/master/addon/utils/load-script.js

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

No branches or pull requests

1 participant