1
0
mirror of synced 2025-12-22 03:16:52 -05:00

Reduce minified JS bundle size from 189kb to 73kb (#17552)

This commit is contained in:
Kevin Heis
2021-01-28 14:12:04 -08:00
committed by GitHub
parent 2572d7bb85
commit 8b86fd8fef
11 changed files with 56 additions and 95 deletions

View File

@@ -1,8 +1,8 @@
import escape from 'lodash/escape'
const wordsLongerThan18Chars = /[\S]{18,}/g
const camelCaseChars = /([a-z])([A-Z])/g
const underscoresAfter12thChar = /([\w:]{12}[^_]*?)_/g
const slashChars = /([/\\])/g
const { escape } = require('lodash')
// This module improves table rendering on reference pages by inserting a <wbr>
// tag in code terms that use camelcase, slashes, or underscores, inspired by