Files
Reservair/webpack.config.js
Martas 1294a177ae (#1) - WebPack bundling of JS and CSS (#1)
This work was done with Claude.

Added bundling of CSS & JS with WebPack. This also means minimization.

---------

Co-authored-by: Martin Slachta <martin.slachta@outlook.com>
Reviewed-on: #1
2026-06-12 10:57:23 +00:00

18 lines
446 B
JavaScript

const defaultConfig = require('@wordpress/scripts/config/webpack.config');
const defaultEntry = defaultConfig.entry;
module.exports = {
...defaultConfig,
entry: async () => {
const entries = typeof defaultEntry === 'function'
? await defaultEntry()
: defaultEntry;
return {
...entries,
client: './src/client.js',
admin: './src/admin.js',
};
},
};