PluginProbe
WDesignKit – AI Templates, Widget Builder & MCP Workflow / 2.6.0
WDesignKit – AI Templates, Widget Builder & MCP Workflow v2.6.0
2.6.6 2.6.5 2.6.4 2.6.3 2.6.2 2.6.1 2.6.0 2.5.5 2.5.4 2.5.3 2.5.2 2.5.1 2.5.0 2.4.0 2.3.3 2.3.2 2.3.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 All 128 releases
wdesignkit / webpack.config.js

webpack.config.js in WDesignKit – AI Templates, Widget Builder & MCP Workflow 2.6.0, at webpack.config.js

37 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 const defaults = require('@wordpress/scripts/config/webpack.config');
2
3 /**
4 * WDesignKit build config.
5 *
6 * WordPress.org builds the translation template (POT) with `wp i18n make-pot`,
7 * which parses every shipped `.js` file using the Peast JS parser. Our single
8 * multi-megabyte minified bundle builds an enormous AST and exhausts make-pot's
9 * memory/time budget on WordPress.org — the POT fails and NO JS strings import.
10 *
11 * Fix (bulletproof, memory-independent): emit the app bundle as `*.min.js`.
12 * `make-pot` skips `*.min.js` files by default (hard-coded exclude), so the huge
13 * bundle is NEVER parsed. The translatable strings are provided separately in a
14 * tiny, readable catalog — build/wdk-i18n-strings.js — generated from src/ by
15 * bin/generate-i18n-strings.js right after this build (see the "build" npm
16 * script). make-pot parses only that small file (well under a second, a few MB
17 * of RAM), so extraction succeeds regardless of WordPress.org's limits. The
18 * catalog is enqueued + registered with wp_set_script_translations(), so the
19 * per-locale JSON loads every string into the shared wp.i18n store at runtime
20 * and the whole React app is translated.
21 */
22 module.exports = {
23 ...defaults,
24 externals: {
25 react: 'React',
26 'react-dom': 'ReactDOM',
27 },
28 output: {
29 ...defaults.output,
30 // App output becomes *.min.js so `wp i18n make-pot` skips it entirely.
31 filename: '[name].min.js',
32 },
33 performance: {
34 hints: false,
35 },
36 };
37