Registry / web-framework / zepto-webpack

zepto-webpack

JSON →
library1.2.1jsnpmunverified

A Webpack-compatible repackaging of Zepto 1.2.0 that exports the library as a module for use with Webpack's ProvidePlugin. This package modifies Zepto's source to include `module.exports = window.Zepto`, allowing direct `$` usage via ProvidePlugin. It addresses Ajax issues (issue 921) and is intended for projects using Webpack 1–4. Released under MIT. Last updated in 2016; no active maintenance or updates beyond Zepto 1.2.0.

npm install zepto-webpack
INSTALL
IMPORT
SIG · ZEPTO-WEBPACK
Z
zepto-webpack
web-frameworkjavascriptv1.2.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

$
new webpack.ProvidePlugin({ $: 'zepto-webpack' })
import $ from 'zepto-webpack'
This package is designed for Webpack's ProvidePlugin, not direct ESM import. Using import will result in an empty object or Zepto not being globally available.
Zepto
new webpack.ProvidePlugin({ Zepto: 'zepto-webpack' })
const Zepto = require('zepto-webpack')
The package sets window.Zepto, so ProvidePlugin maps the global. Direct require may not expose Zepto as expected in all contexts.
Module
// Not applicable; use ProvidePlugin
This package is not a standard module; it only exports window.Zepto. Do not attempt to import or require it as a typical module.

Demonstrates using zepto-webpack with Webpack ProvidePlugin to make Zepto ($ and Zepto) globally available without explicit imports.

// webpack.config.js const webpack = require('webpack'); module.exports = { entry: './src/index.js', output: { path: __dirname + '/dist', filename: 'bundle.js' }, plugins: [ new webpack.ProvidePlugin({ $: 'zepto-webpack', Zepto: 'zepto-webpack' }) ] };
Debug
Known issues
deprecatedThis package is based on Zepto 1.2.0 (2016) and is no longer maintained. Use a modern jQuery alternative or a direct Zepto ESM wrapper.
fix
Consider using Zepto via CDN or a maintained npm package like 'zepto' with proper module bundler config.
affects: >=1.0.0
gotchaDirect import or require may not work correctly because the package only adds `module.exports = window.Zepto` at the end. It does not export Zepto as a proper ES module.
fix
Always use ProvidePlugin as shown in the README. Do not rely on standard module imports.
affects: >=1.0.0
gotchaIf used with Webpack 5, ProvidePlugin behavior may differ. The package may not correctly set up Zepto globally.
fix
Test with Webpack 5; consider patching the package manually or switching to a maintained alternative.
affects: >=1.2.0
breakingThe package modifies Zepto source to add `module.exports = window.Zepto`. This overwrites any previous exports and may conflict with other Zepto wrappers.
fix
Use only one Zepto wrapper; avoid mixing with other Zepto modules.
affects: >=1.0.0
Errors
Common errors & fixes
Module not found: Error: Can't resolve 'zepto-webpack'
Package not installed or not in node_modules.
fix
Run `npm install zepto-webpack` and ensure webpack config resolves to node_modules.
$ is not defined
ProvidePlugin not configured correctly or zepto-webpack fails to assign to $.
fix
Add `new webpack.ProvidePlugin({ $: 'zepto-webpack' })` to webpack plugins array.
Uncaught TypeError: Cannot read property 'fn' of undefined
Zepto not loaded properly (likely due to wrong import method).
fix
Use ProvidePlugin as described, not direct import/require.
window.Zepto is not a function
The package may not have executed because Webpack tree-shaking removed it.
fix
Ensure ProvidePlugin is used and that zepto-webpack is included in the bundle (e.g., avoid unused module warnings).
Upgrade
Version history
1.2.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
16
OpenAI (training)
1
Resources
zepto-webpack — npm install zepto-webpack · libregistry