Skip to content

Using Twix.js with Moment timezone via WebpackΒ #102

@l2aelba

Description

@l2aelba

❗ This is not possible to use Twix.js with moment-timezone when I importing like this via Webpack

import moment from 'moment-timezone'
import 'twix'

And use something like

moment.twix()

So I got error

Uncaught (in promise) TypeError: __WEBPACK_IMPORTED_MODULE_4_moment_timezone___default.a.twix is not a function

πŸŽ‰ But this is possible to do if I want to use moment as moment-timezone

import moment from 'moment-timezone'
import _moment from 'moment'
import 'twix'

And use something like

_moment.twix()

Question is, Does it possible to use moment.twix() when moment is moment-timezone ?

PS: All are latest versions
Thanks so much.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions