This is likely more trouble than it's worth, but it's possible to reference webpack.config.js from node_modules instead of copying the stub into each project, those wouldn't need it at all.
This is what the start command in package.json's scripts would be:
webpack serve --config node_modules/@ideasonpurpose/build-tools-wordpress/config/webpack.config.js
{
"scripts:" {
"build": "NODE_ENV=production webpack --config node_modules/@ideasonpurpose/build-tools-wordpress/config/webpack.config.js",
"start": "webpack serve --config node_modules/@ideasonpurpose/build-tools-wordpress/config/webpack.config.js",
}
}
The problem is when we need to override the default config, we'd need to make three edits: create a new local webpack.config.js file and then modify package.json scripts.start and scripts.build. With the stub export, we would only need to modify a single file to add an entry point.
This is likely more trouble than it's worth, but it's possible to reference webpack.config.js from node_modules instead of copying the stub into each project, those wouldn't need it at all.
This is what the
startcommand in package.json's scripts would be:{ "scripts:" { "build": "NODE_ENV=production webpack --config node_modules/@ideasonpurpose/build-tools-wordpress/config/webpack.config.js", "start": "webpack serve --config node_modules/@ideasonpurpose/build-tools-wordpress/config/webpack.config.js", } }The problem is when we need to override the default config, we'd need to make three edits: create a new local webpack.config.js file and then modify package.json
scripts.startandscripts.build. With the stub export, we would only need to modify a single file to add an entry point.