HEX
Server: Apache
System: Linux p3plzcpnl507418.prod.phx3.secureserver.net 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64
User: retoti4c1e1s (10075650)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /home/retoti4c1e1s/public_html/thameenah.com/wp-content/themes/covernews-pro/webpack.config.js
const ExtractText = require('extract-text-webpack-plugin');
const path = require('path');

const devMode = process.env.NODE_ENV !== 'production';

const editorStyles = new ExtractText({
    filename: './blocks.editor.build.css',
});

const frontendStyles = new ExtractText({
    filename: './style-admin_dashboard.css',
});

const plugins = [editorStyles, frontendStyles];

const scssConfig = {
    use: [
        {
            loader: 'css-loader',
        },
        {
            loader: 'sass-loader',
            options: {
                prependData: '@import "./src/common.scss";\n',
            },
        },
    ],
};

module.exports = {
    context: __dirname,
    devtool: devMode ? 'inline-sourcemap' : false,
    mode: devMode ? 'development' : 'production',
    entry: {
        admin_dashboard: './index.js',
        plugin_installer: './admin-dashboard/assets/js/plugin-installer.js'
    },
    output: {
        path: __dirname + '/admin-dashboard/dist/',
        filename: '[name].build.js',
    },
    module: {
        rules: [
            {
                test: /\.js$/,
                exclude: [
                    path.resolve(__dirname, 'node_modules'),
                    path.resolve(__dirname, 'build'),
                    path.resolve(__dirname, 'vendor'),
                ],
                use: [
                    {
                        loader: 'babel-loader',
                        options: {
                            presets: ['@babel/preset-react'],
                        },
                    },
                ],
            },
            {
                test: /editor\.scss$/,
                exclude: [
                    path.resolve(__dirname, 'node_modules'),
                    path.resolve(__dirname, 'build'),
                    path.resolve(__dirname, 'vendor'),
                ],
                use: editorStyles.extract(scssConfig),
            },
            {
                test: /style\.scss$/,
                exclude: [
                    path.resolve(__dirname, 'node_modules'),
                    path.resolve(__dirname, 'build'),
                    path.resolve(__dirname, 'vendor'),
                ],
                use: frontendStyles.extract(scssConfig),
            },
            {
                test: /\.(png|svg|jpe?g|gif)$/,
                include: /images/,
                use: [
                    {
                        loader: 'file-loader',
                        options: {
                            name: '[name].[ext]',
                            outputPath: 'images/',
                            publicPath: 'images/'
                        }
                    }
                ]
            },

        ],
    },
    externals: {
        'lodash': 'lodash'
    },
    plugins,
};