import { addYears, addMonths, addWeeks, addDays, addHours, addMinutes } from 'date-fns';// Without tree-shaking:import parse from 'date-fns/parse'
// With tree-shak
for data properties on `this` // if using webpack 2+ or rollup, to leverage treeshaking: "moduleResolution": "node"}
目前,虽然此时IE11支持还没有准备好(但无论如何可能不会影响此配置
modules: false`, which is apparently needed to command Babel not to transpile the ESM import so that tree-shakingThe option `sideEffects: false` is required for tree-shaking to work.