@gravityforms/gulp-tasks
Version:
Configurable Gulp tasks for use in Gravity Forms projects.
36 lines (29 loc) • 764 B
JavaScript
/**
* External Dependencies
*/
import { createRequire } from 'node:module';
const require = createRequire( import.meta.url );
const { mergeWithCustomize, customizeArray } = require( 'webpack-merge' );
/**
* Internal Dependencies
*/
import getConfig from '../../config.js';
import prodBase from './configs/prod-base.js';
import externals from './externals/adminblocks/index.js';
const { config } = getConfig();
export default mergeWithCustomize( {
customizeArray: customizeArray( {
optimization: 'append',
plugins: 'append',
} ),
} )( prodBase, {
entry: config.webpack?.overrides?.entry?.adminblocks || {
blocks: [
`${ config.paths.js_src }/legacy/admin/blocks/index.js`,
],
},
externals,
output: {
path: config.paths.js_dist,
},
} );