All Downloads are FREE. Search and download functionalities are using the official Maven repository.

views.react.webpack.client.js Maven / Gradle / Ivy

There is a newer version: 4.7.0
Show newest version
const path = require('path');
const webpack = require('webpack');

module.exports = {
    entry: ['./client.js'],
    devtool: false,
    output: {
        path: path.resolve(process.env.BUILD_DIR) || path.resolve(__dirname, "../../../build/js"),
        filename: 'client.js',
    },
    plugins: [
        new webpack.DefinePlugin({
            SERVER: false,
        })
    ],
    module: {
        rules: [
            {
                test: /\.js$/,
                exclude: /node_modules/,
                use: {
                    loader: 'babel-loader',
                    options: {
                        presets: ['@babel/preset-env', '@babel/preset-react']
                    }
                }
            }
        ]
    }
};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy