I am trying to setup vue cli with jquery ui, but couldn't figure out how to use jquery ui components. I need to load following js files
https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js
https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.0/jquery-ui.min.js
https://cdn.jsdelivr.net/jquery.ui.timepicker.addon/1.4.5/jquery-ui-timepicker-addon.min.js
https://cdn.jsdelivr.net/jquery.ui.timepicker.addon/1.4.5/jquery-ui-sliderAccess.js
and css files
https://code.jquery.com/ui/1.10.0/themes/smoothness/jquery-ui.css
https://cdn.jsdelivr.net/jquery.ui.timepicker.addon/1.4.5/jquery-ui-timepicker-addon.min.css
To make the timepicker work. Here is a codepen link where I have tested the functionality. https://codepen.io/cksachdev/pen/EJgGVR
Any suggestions on how should I go about loading these using vue-cli/ webpack configuration.
Here is what I have tried so far:
module: {
loaders: [
{ test: /\.css$/, loader: ['style-loader', 'css-loader'] },
{ test: /\.(jpe?g|png|gif)$/i, loader: 'file-loader' },
],
},
plugins: [
// eslint-disable-next-line no-undef
new webpack.ProvidePlugin({
$: 'jquery',
jquery: 'jquery',
'window.jQuery': 'jquery',
jQuery: 'jquery',
}),
],
resolve: {
alias: {
'jquery-ui': '../../../node_modules/jquery-ui/ui/widgets',
'jquery-ui-css': '../../../node_modules/jquery-ui/../../themes/base',
},
},