I loaded select2 as a node module:
npm install select2
and included it in my app.js :
require('select2')($);
When I start
webpack , there are no errors, but when I open the application, I get:
Uncaught TypeError: Object.defineProperty called on non-object(…)
coming from select2.js :
S2.define('select2/core',[ 'jquery', './options', './utils', './keys' ], function ($, Options, Utils, KEYS) { (...) }
Does this select2 because the module shell for select2 only works with AMD and is not compatible with CommonJS?
source share