Skip to content

Instantly share code, notes, and snippets.

View HamidOsouli-zz's full-sized avatar
🖥️
Always Learning

Hamid HamidOsouli-zz

🖥️
Always Learning
View GitHub Profile
package sample;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import javax.validation.Constraint;
@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER })
@Retention(RetentionPolicy.RUNTIME)
@HamidOsouli-zz
HamidOsouli-zz / analyzerCRA.js
Created September 29, 2021 11:10
Webpack bundle analyzer for CRA (create-react-app)
process.env.NODE_ENV = 'production';
const webpack = require('webpack');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const webpackConfigProd = require('react-scripts/config/webpack.config')('production');
const chalk = require('chalk');
const ProgressBarPlugin = require('progress-bar-webpack-plugin');
const green = text => {
return chalk.green.bold(text);