SmartWizard in Webpack #126
Answered
by
techlab
garethfoxtrot
asked this question in
Q&A
-
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.
Answered by
techlab
Jul 2, 2022
Replies: 2 comments 1 reply
-
@garethfoxtrot I will check it, thanks for bringing it up. |
Beta Was this translation helpful? Give feedback.
1 reply
-
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.
0 replies
Answer selected by
techlab
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please follow the steps
Install required modules
Common JS/Webpack
OR
ES6/Babel