SmartWizard in Webpack #126
-
Hi, it's possible add SmartWizard library to Webpack? Actuallly I added lib to file app.js in webpack as: require("smartwizard"); or require('smartwizard')( window, $ ); but in browser is the following error: Uncaught TypeError: jquery__WEBPACK_IMPORTED_MODULE_2___default(...)(...).SmartWizard is not a function. It's possible fix this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@garethfoxtrot I will check it, thanks for bringing it up. |
Beta Was this translation helpful? Give feedback.
-
Please follow the steps Install required modulesnpm i jquery
npm i smartwizard
// Webpack
npm install webpack webpack-cli style-loader css-loader --save-dev Common JS/Webpackvar $ = require( "jquery" );
require( "smartwizard/dist/css/smart_wizard_all.css");
const smartWizard = require("smartwizard");
$(function() {
$('#smartwizard').smartWizard();
}); OR ES6/Babelimport $ from "jquery";
import "smartwizard/dist/css/smart_wizard_all.css";
import smartWizard from 'smartwizard';
$(function() {
$('#smartwizard').smartWizard();
}); |
Beta Was this translation helpful? Give feedback.
Please follow the steps
Install required modules
Common JS/Webpack
OR
ES6/Babel