Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
webpack-jquery-ui
✓ import 'webpack-jquery-ui'
✗ import jQueryUI from 'webpack-jquery-ui'
Default import is not supported; the entire module is side-effects only. Use bare import.
css
✓ import 'webpack-jquery-ui/css'
✗ import css from 'webpack-jquery-ui/css'
CSS import similarly is a side-effect; default import will be undefined.
interactions
✓ require('webpack-jquery-ui/interactions')
✗ import { interactions } from 'webpack-jquery-ui'
Named exports not available. Use CommonJS require with subpath.
Sets up full jQuery UI with webpack, including ProvidePlugin and CSS loading.
// install: npm install webpack-jquery-ui jquery
// webpack.config.js
const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
publicPath: 'dist/'
},
module: {
rules: [
{ test: /\.css$/, use: ['style-loader', 'css-loader'] },
{ test: /\.(png|jpe?g|gif)$/i, use: 'file-loader' }
]
},
plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery',
'window.$': 'jquery'
})
]
};
// index.js
require('webpack-jquery-ui');
require('webpack-jquery-ui/css');
$(function() {
$('#datepicker').datepicker();
});
Errors
Common errors & fixes
Error: Cannot find module 'jquery'
jquery not installed as a dependency
fixRun 'npm install jquery' and add ProvidePlugin to webpack config.
Error: Module parse failed: Unexpected token (1:0) You may need an appropriate loader to handle this file type.
Missing style-loader or css-loader for CSS files
fixInstall 'npm install --save-dev style-loader css-loader' and add a rule for .css files in webpack config.
$(...).datepicker is not a function
jQuery UI not properly loaded or initialized after DOM ready
fixEnsure you have require('webpack-jquery-ui') in your entry file and wrap code in $(function() { ... }) or DOMContentLoaded event. Audit
Dependencies
jqueryrequiredpeer dependency required for jQuery UI
jquery-uirequiredcore jQuery UI library
css-loaderrequiredrequired to load CSS files
style-loaderrequiredinjects CSS into DOM
file-loaderoptionalhandles image assets