homegrade_blocks_production/webpack.config.js
2025-08-05 15:35:23 +02:00

29 lines
673 B
JavaScript

const defaultConfig = require("@wordpress/scripts/config/webpack.config");
const path = require("path");
module.exports = {
...defaultConfig,
entry: {
index: path.resolve(process.cwd(), "src/", "index.js"),
tooltipFront: path.resolve(process.cwd(), "src/format-types/tooltip", "tooltip-front.js"),
editorAdjustements: path.resolve(process.cwd(), "./", "block_editor_adjustments.js"),
},
module: {
...defaultConfig.module,
rules: [
...defaultConfig.module.rules,
{
test: /\.(png|jpg|gif|svg)$/i,
use: [
{
loader: "url-loader",
options: {
limit: 8192,
},
},
],
},
],
},
};