@gravityforms/gulp-tasks
Version:
Configurable Gulp tasks for use in Gravity Forms projects.
31 lines (28 loc) • 746 B
JavaScript
const webpack = require( 'webpack' );
const WatchExternalFilesPlugin = require( 'webpack-watch-files-plugin' ).default;
const getConfig = require( '../../../config' );
const { config } = getConfig();
module.exports = {
theme: [
new webpack.DefinePlugin( {
'process.env.RUN_MODE': JSON.stringify( 'development' ),
} ),
new WatchExternalFilesPlugin( {
files: [
`${ config.paths.js_src }common/**/*.js`,
`${ config.paths.js_src }utils/**/*.js`,
],
} ),
],
admin: [
new webpack.DefinePlugin( {
'process.env.RUN_MODE': JSON.stringify( 'development' ),
} ),
new WatchExternalFilesPlugin( {
files: [
`${ config.paths.js_src }common/**/*.js`,
`${ config.paths.js_src }utils/**/*.js`,
],
} ),
],
};