rsnext/test/integration/future/pages/index.js
Jason Miller 8bd2e433de Initial optimizeLibraries experimental flag (#8345)
* Add experimental optimizeLibraries flag, currently prunes Moment.js locales

* expose moment for use in assertion

* try with the same setup as the production integration test

* Apply optimiztaions in dev and on server so they're consistent.

* fix build (oh dear)

* Update index.test.js

* Rename flag to future.excludeDefaultMomentLocales

* Adjust impl
2019-08-20 15:19:45 -04:00

5 lines
161 B
JavaScript

import moment from 'moment'
if (typeof window !== 'undefined') {
window.moment = moment
}
export default () => <h1>Current time: {moment().format('LLL')}</h1>