Flatpickr: Using with ES6 modules (no typescript, no webpack)

Created on 28 Nov 2018  路  3Comments  路  Source: flatpickr/flatpickr

I am trying to use flatpickr directly as ES6 module.

I tried import {flatpickr} from './flatpickr/dist/flatpickr.js';

But it did not worked because there is no ES6 module export in the file.

Is there a way to use it natively with ES6 without any webpack or TS dependencies?

Most helpful comment

Just found this library and started to use it. I'd really happy to use it as an ES6 module, as @zortext mentioned in the first example, so 馃憤 for this.

All 3 comments

Use it like this

import Flatpickr from 'flatpickr';

This won't work without a bundler. I am looking for a pure ecmascript solution. No bundlers no loaders...

Just found this library and started to use it. I'd really happy to use it as an ES6 module, as @zortext mentioned in the first example, so 馃憤 for this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mchaves-ciandt picture mchaves-ciandt  路  3Comments

bedakb picture bedakb  路  3Comments

719media picture 719media  路  3Comments

deangibson89 picture deangibson89  路  3Comments

pimskie picture pimskie  路  3Comments