Skip to content

Instantly share code, notes, and snippets.

View pranay321's full-sized avatar

pranay pranay321

  • Mumbai
View GitHub Profile
@pranay321
pranay321 / webpack.config.js
Created June 30, 2019 07:54
Extract the vendor and the runtime code
change
splitChunks: {
chunks: 'all',
name: false,
},
to
splitChunks: {
@pranay321
pranay321 / webpack.config.js
Created June 30, 2019 07:58
Extract the vendor and the runtime code
change
splitChunks: {
chunks: 'all',
name: false,
},
to
splitChunks: {
@pranay321
pranay321 / getScopedName.js
Created June 30, 2019 09:52
Minify Classnames
const incstr = require('incstr');
const createUniqueIdGenerator = () => {
const uniqIds = {};
const generateNextId = incstr.idGenerator({
alphabet: 'abcefghijklmnopqrstuvwxyzABCEFGHJKLMNOPQRSTUVWXYZ',
});
return name => {
if (!uniqIds[name]) {