# wdesignkit/2.7.0/webpack.config.js

WDesignKit – AI Templates, Widget Builder &amp; MCP Workflow, version 2.7.0. 37 lines.

- Page: https://pluginprobe.com/plugins/wdesignkit/2.7.0/code/webpack.config.js
- Raw: https://pluginprobe.com/plugins/wdesignkit/2.7.0/raw/webpack.config.js
- Modified: 2026-07-09T05:30:06+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wdesignkit/2.7.0/code/webpack.config.js#L10-L20`.

```javascript
const defaults = require('@wordpress/scripts/config/webpack.config');

/**
 * WDesignKit build config.
 *
 * WordPress.org builds the translation template (POT) with `wp i18n make-pot`,
 * which parses every shipped `.js` file using the Peast JS parser. Our single
 * multi-megabyte minified bundle builds an enormous AST and exhausts make-pot's
 * memory/time budget on WordPress.org — the POT fails and NO JS strings import.
 *
 * Fix (bulletproof, memory-independent): emit the app bundle as `*.min.js`.
 * `make-pot` skips `*.min.js` files by default (hard-coded exclude), so the huge
 * bundle is NEVER parsed. The translatable strings are provided separately in a
 * tiny, readable catalog — build/wdk-i18n-strings.js — generated from src/ by
 * bin/generate-i18n-strings.js right after this build (see the "build" npm
 * script). make-pot parses only that small file (well under a second, a few MB
 * of RAM), so extraction succeeds regardless of WordPress.org's limits. The
 * catalog is enqueued + registered with wp_set_script_translations(), so the
 * per-locale JSON loads every string into the shared wp.i18n store at runtime
 * and the whole React app is translated.
 */
module.exports = {
  ...defaults,
  externals: {
    react: 'React',
    'react-dom': 'ReactDOM',
  },
  output: {
    ...defaults.output,
    // App output becomes *.min.js so `wp i18n make-pot` skips it entirely.
    filename: '[name].min.js',
  },
  performance: {
    hints: false,
  },
};

```
