Fix for the webpack issue

export choices as a class to circumvent the webpack issue
This commit is contained in:
Darren Mackintosh 2019-03-14 11:23:12 +00:00 committed by GitHub
parent 2fa92520ef
commit f9f63e7aba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -43,7 +43,7 @@ import {
* Choices
* @author Josh Johnson<josh@joshuajohnson.co.uk>
*/
class Choices {
export class Choices {
constructor(element = '[data-choice]', userConfig = {}) {
if (isType('String', element)) {
const elements = Array.from(document.querySelectorAll(element));
@ -2083,5 +2083,3 @@ class Choices {
}
Choices.userDefaults = {};
// We cannot export default here due to Webpack: https://github.com/webpack/webpack/issues/3929
module.exports = Choices;