HEX
Server: Apache
System: Linux 65-254-81-60.cprapid.com 4.18.0-477.27.2.el8_8.x86_64 #1 SMP Fri Sep 29 08:21:01 EDT 2023 x86_64
User: roshanchandy (1003)
PHP: 8.4.12
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/roshanchandy/www/buildmydesign.in/wp-content/plugins/astra-sites/webpack.config.js
const RtlCssPlugin = require( 'rtlcss-webpack-plugin' );
const path = require( 'path' );
const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );

module.exports = {
	...defaultConfig,
	entry: path.join( __dirname, 'inc/assets/js/index.js' ),
	plugins: [
		...defaultConfig.plugins,
		new RtlCssPlugin( {
			filename: '[name]-rtl.css',
		} ),
	],
	externals: {
		react: 'React',
		'react-dom': 'ReactDOM',
	},
	module: {
		rules: [
			...defaultConfig.module.rules,
			{
				test: /\.s[ac]ss$/i,
				use: [
					// Compiles Sass to CSS
					'sass-loader',
					// PostCSS
					'postcss-loader',
				],
			},
			{
				test: /\.css$/i,
				use: [
					// Translates CSS into CommonJS
					'css-loader',
					// PostCSS
					'postcss-loader',
				],
			},
		],
	},
	resolve: {
		// ...
		fallback: {
			'react/jsx-runtime': require.resolve( 'react/jsx-runtime' ),
		},
		alias: {
			...defaultConfig.resolve.alias,
			'@WhatsNew': path.resolve( __dirname, 'inc/lib/whats-new/' ),
		},
	},
};