1.0.6 • Published 6 years ago

@rockmandash/font-subset v1.0.6

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

font-subset

Faster font load time by subsetting fonts.

Requirement

Need create-react-app v2!

yarn add @rockmandash/font-subset yarn add import-all.macro emotion react-emotion lodash

pip install fonttools pip install Brotli

Usage

First, modify npm scripts "build": "subset-font && react-scripts build",

then just import fonts in the top of index.js file import "@rockmandash/font-subset/NotoSansTC"

production

process.env.NODE_ENV === 'production'; font-subset will search all js/css/html files in src/ directory, retrieve all unique chinese words, and create new subset fonts.

development

process.env.NODE_ENV === 'development'; font-subset will serve whole fonts.

1.0.6

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago