UNPKG

@gravityforms/gulp-tasks

Version:
34 lines (30 loc) 841 B
import { createRequire } from 'node:module'; import getConfig from '../../../config.js'; const require = createRequire( import.meta.url ); const webpack = require( 'webpack' ); const { default: WatchExternalFilesPlugin } = require( 'webpack-watch-files-plugin' ); const { config } = getConfig(); export default { 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`, ], } ), ], };