| 1 |
const path = require('path'); |
| 2 |
|
| 3 |
module.exports = { |
| 4 |
entry: { |
| 5 |
// Unprefixed entry key preserved (not `modules/ai-editor`). A `modules/` |
| 6 |
// key folds the code into the SPA bundle graph |
| 7 |
// (react-src/generated/moduleManifest.ts, Constitution XIII) and stops |
| 8 |
// emitting a standalone file — but module.php enqueues this bundle BY |
| 9 |
// PATH as `js/ai-editor.js`, and only on editor screens, so it must keep |
| 10 |
// existing as its own file and must NOT join the always-loaded SPA |
| 11 |
// bundle. Same exception as `elementor` / `gutenberg`. |
| 12 |
'ai-editor': path.resolve(__dirname, 'assets/js/index.tsx'), |
| 13 |
}, |
| 14 |
}; |
| 15 |
|