Skip to content

Instantly share code, notes, and snippets.

@longlho
Created February 23, 2017 16:32
Show Gist options
  • Save longlho/66fbd413c51cae5051d71aa1b20e704b to your computer and use it in GitHub Desktop.
Save longlho/66fbd413c51cae5051d71aa1b20e704b to your computer and use it in GitHub Desktop.
intl tree-shaking
// lib.js
import formatRelative from 'intl-relativeformat'
export function foo () {
formatRelative()
}
export function bar () {}
// main.js
import { bar } from 'lib'
bar()
// Result would have intl-relativeformat, intl-messageformat & its parser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment