HEX
Server: Apache
System: Linux ecngx285.inmotionhosting.com 4.18.0-553.79.1.lve.el8.x86_64 #1 SMP Wed Oct 15 17:59:35 UTC 2025 x86_64
User: zeusxp5 (3862)
PHP: 8.3.28
Disabled: NONE
Upload Files
File: /home/zeusxp5/chuair.org/wp-content/themes/lifttruck/webpack.config.js
// WordPress webpack config.
const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );
const CopyWebpackPlugin = require('copy-webpack-plugin');
const { getWebpackEntryPoints } = require('@wordpress/scripts/utils/config');

// Plugins.
const RemoveEmptyScriptsPlugin = require( 'webpack-remove-empty-scripts' );
const TerserPlugin = require('terser-webpack-plugin');
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');

// Utilities.
const path = require( 'path' );

// Add any a new entry point by extending the webpack config.
module.exports = {
	...defaultConfig,
	...{
		entry: {
      ...getWebpackEntryPoints(),

			'js/editor'           : path.resolve( process.cwd(), 'resources/js',   'editor.js'   ),
			'js/screen'           : path.resolve( process.cwd(), 'resources/js',   'screen.js'   ),
			'js/metabox-fields'   : path.resolve( process.cwd(), 'resources/js',   'metabox-fields.js'   ),
			'css/screen'          : path.resolve( process.cwd(), 'resources/scss', 'screen.scss' ),
			'css/editor'          : path.resolve( process.cwd(), 'resources/scss', 'editor.scss' ),
		},
		plugins: [
			// Include WP's plugin config.
			...defaultConfig.plugins,

			// Removes the empty `.js` files generated by webpack but
			// sets it after WP has generated its `*.asset.php` file.
			new RemoveEmptyScriptsPlugin( {
				stage: RemoveEmptyScriptsPlugin.STAGE_AFTER_PROCESS_PLUGINS
			} ),
      
      new CopyWebpackPlugin({
        patterns: [
          {from: "resources/images", to: "images"}
        ],
      }),
		],
    optimization: {
      minimize: true,
      minimizer: [
        new TerserPlugin({
          parallel: true,
          terserOptions: {
            ecma: undefined,
            warnings: false,
            parse: {},
            compress: false,
            mangle: true,
            module: false,
            output: {
              beautify: true
            },
            toplevel: false,
            nameCache: null,
            ie8: false,
            keep_fnames: false,
          },
        }),
				new CssMinimizerPlugin()
      ]
    }
	}
};