Closed alexis-riot closed 4 years ago
Hello,
I try to import Switchery from node_modules (using NPM). I do this code:
try { window.$ = window.jQuery = require('jquery'); window.Popper = require('popper.js').default; require('bootstrap'); require('imports-loader'); require('jquery-slimscroll'); require('switchery/standalone/switchery'); require('./vendor/core');
vendor/core.js:
var setting_first = document.querySelector('.js-switch-setting-first'); var switchery = new Switchery(setting_first, { color: '#0080ff', size: 'small' });
But this is not working. It return me an error:
Uncaught ReferenceError: Switchery is not defined
Hello,
I try to import Switchery from node_modules (using NPM). I do this code:
vendor/core.js:
But this is not working. It return me an error: