Skip to content

Instantly share code, notes, and snippets.

View tugayilik's full-sized avatar
👋
Focusing

Tugay İlik tugayilik

👋
Focusing
View GitHub Profile
@tugayilik
tugayilik / delete-unused-local-branches.sh
Created May 19, 2020 10:40
delete unused local branches
git fetch --all -p; git branch -vv | grep ": gone]" | awk '{ print $1 }' | xargs -n 1 git branch -D
const ModuleReplacement = require('path/to/module-replacement-resolver');
module.exports = {
entry: ''/* @code */,
output: { /* @code */ },
// Set all replacements
plugins: [...ModuleReplacement()]
}
module.exports = function () {
// The modules which can be toggled.
// Eg. This config can be exported from db. For now its static.
const modules = { Module1: true, Module2: true };
const replacements = [];
for (const moduleName in modules) {
if (modules.hasOwnProperty(moduleName)) {
(function (name) {
replacements.push(new webpack.NormalModuleReplacementPlugin(
module.exports = function () {
// The modules which can be toggled.
// Eg. This config can be exported from db. For now its static.
const modules = { Module1: true, Module2: true };
const replacements = [];
for (const moduleName in modules) {
if (modules.hasOwnProperty(moduleName)) {
// ...
}