@soda-gql/webpack-plugin weekly downloads statistics
By soda-gql · npm · Webpack plugins
Webpack plugin for soda-gql with HMR support
@soda-gql/webpack-plugin has 201 recorded weekly downloads on npm, ranking #2495 of 3,247 tracked listings.
About @soda-gql/webpack-plugin
@soda-gql/webpack-plugin
Webpack plugin for soda-gql with incremental rebuild and HMR support.
Installation
npm install @soda-gql/webpack-plugin
# or
yarn add @soda-gql/webpack-plugin
# or
bun add @soda-gql/webpack-plugin
Usage
webpack.config.js
const { SodaGqlWebpackPlugin } = require("@soda-gql/webpack-plugin");
module.exports = {
plugins: [
new SodaGqlWebpackPlugin({
// Optional: Path to soda-gql config file
configPath: "./soda-gql.config.ts",
// Optional: Enable/disable the plugin (default: true)
enabled: process.env.NODE_ENV !== "test",
// Optional: Enable debug logging (default: false)
debug: process.env.DEBUG === "true",
}),
],
module: {
rules: [
{
test: /\.tsx?$/,
exclude: /node_modules/,
use: [
// Your existing loaders (ts-loader, babel-loader, etc.)
"ts-loader",
// Add soda-gql loader
{
loader: "@soda-gql/webpack-plugin/loader",
options: {
// Same options as plugin
configPath: "./soda-gql.config.ts",
},
},
],
},
],
},
};
With webpack-dev-server
The plugin automatically handles HMR (Hot Module Replacement) for soda-gql files. When a model file changes, all dependent slices and operations are automatically rebuilt.
// webpack.config.js
module.exports = {
devServer: {
hot: true,
},
plugins: [
new SodaGqlWebpackPlugin({
debug: true, // Enable to see rebuild logs
}),
],
// ... rest of config
};
How It Works
-
Plugin Initialization: On
beforeRunhook, the plugin initializes and builds the initial artifact. -
Watch Mode: On
watchRunhook, the plugin:- Rebuilds the artifact (detects file changes automatically)
- Computes which files are affected by the changes
- Shares the updated artifact with the loader
-
Loader Processing: The loader:
- Uses the pre-built artifact from the plugin (shared state)
- Transforms soda-gql code using the Babel plugin
- Adds file dependencies for proper HMR propagation
-
Internal Module Stubbing: graphql-system and inject modules (scalars, adapter) are stubbed with
export {};in the final bundle, reducing bundle size.
Options
SodaGqlWebpackPlugin Options
| Option | Type | Default | Description |
|---|---|---|---|
configPath | string | undefined | Path to soda-gql config file |
enabled | boolean | true | Enable/disable the plugin |
include | RegExp | RegExp[] | undefined | File patterns to include |
exclude | RegExp | RegExp[] | undefined | File patterns to exclude |
debug | boolean | false | Enable verbose logging |
Loader Options
| Option | Type | Default | Description |
|---|---|---|---|
configPath | string | undefined | Path to soda-gql config file |
enabled | boolean | true | Enable/disable the loader |
Dependency Tracking
The plugin tracks dependencies between soda-gql files:
- Models: Base definitions (no dependencies)
- Operations: Reference models via
model.spread()
When a model file changes:
- The model is rebuilt
- All operations that use the model are rebuilt
This ensures that changes propagate correctly through the dependency chain.
License
MIT
Description from the npm listing.
- graphql
- codegen
- zero-runtime
- typescript
- webpack
- webpack-plugin
- hmr
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (1)Similar npm Webpack plugins plugins
All 20 @soda-gql/webpack-plugin alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@soda-gql/webpack-plugin. First seen Dec 6, 2026; last successful collection Dec 6, 2026. See the methodology.