Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Jquery Laravel Package

contao-components/jquery

Provides the jQuery library as a Contao component/package for easy inclusion in Contao projects. Useful for managing a consistent jQuery version, updating via Composer, and integrating jQuery-dependent scripts without manual downloads or asset handling.

View on GitHub
Deep Wiki
Context7

jQuery integration

Frequently asked questions about Jquery
Can I use **contao-components/jquery** in a Laravel project without Contao?
This package is designed for Contao projects, not standalone Laravel apps. For Laravel, consider installing jQuery via npm (`npm install jquery`) or using a CDN directly. The package’s Contao-specific conventions may cause conflicts in vanilla Laravel setups.
What jQuery version does this package provide, and how do I update it?
The package ships upstream jQuery builds (e.g., 3.x). Update versions by modifying `composer.json` under `require` and running `composer update contao-components/jquery`. Always test updates for Contao compatibility, as breaking changes may occur.
How do I include jQuery in Laravel Blade templates using this package?
After installing via Composer, include jQuery in Blade by referencing the package’s asset path (check the package’s `resources` or `public` folder). For Contao projects, follow Contao’s asset pipeline conventions. Avoid global `$` conflicts by loading jQuery before Contao-specific scripts.
Will this package work with Laravel Mix or Vite?
No, this package is not optimized for Laravel Mix/Vite. For modern Laravel, install jQuery via npm (`npm install jquery`) and configure Mix/Vite to avoid duplicates. Use `externals` or `resolve.alias` in webpack to prevent bundling conflicts.
Does this package support jQuery plugins (e.g., DataTables, Select2)?
Yes, but plugins must be loaded *after* jQuery. For Contao projects, ensure plugins are included in the correct order via Contao’s asset pipeline. For Laravel, manually include plugin scripts in Blade or via npm if using a frontend build tool.
Is **contao-components/jquery** secure? How do I handle jQuery vulnerabilities?
jQuery is no longer actively maintained, so vulnerabilities may exist. Pin to a specific minor version (e.g., `3.6.0`) in `composer.json` and monitor Contao’s compatibility notes. For Laravel, consider modern alternatives like Alpine.js or vanilla JS to reduce dependency risks.
Can I use this package alongside Alpine.js or Livewire in Laravel?
jQuery and Alpine.js/Livewire can coexist, but `$` conflicts may arise. Load jQuery first, then Alpine.js/Livewire. For Contao projects, test thoroughly—some Contao modules rely on jQuery’s DOM APIs. In Laravel, prefer Alpine.js for reactivity to avoid jQuery entirely.
How do I lazy-load jQuery to improve performance?
This package doesn’t natively support lazy-loading. For Contao, defer jQuery via Contao’s asset pipeline settings. In Laravel, use a CDN with `defer` or lazy-load jQuery dynamically in JavaScript (e.g., `if (!window.jQuery) { loadScript('jquery.min.js'); }`).
What’s the difference between this package and installing jQuery via npm?
This package is tailored for Contao’s PHP/Composer ecosystem, ensuring version consistency with Contao’s requirements. npm installation gives more control for Laravel/Mix/Vite but lacks Contao-specific optimizations. Choose npm for modern Laravel; use this package only for Contao integrations.
Does this package work with Laravel 10+ and PHP 8.2?
The package itself is PHP-agnostic, but jQuery 3.x supports modern browsers. Test compatibility with Contao’s latest version, as Contao may enforce specific jQuery features. For Laravel, ensure no PHP version conflicts arise during Composer installation (e.g., `platform-check` in `composer.json`).
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky