janjakubnanista / downsample

Collection of several downsampling methods for time series visualisation purposes.
MIT License
89 stars 9 forks source link

Importing with --experimental-modules #1

Closed tredondo closed 4 years ago

tredondo commented 6 years ago

Thanks for the module! Is there a way to import a specific method in Node v8.5+ with the --experimental-modules flag? import { LTTB } from 'downsample' fails.

SyntaxError: The requested module 'downsample' does not provide an export named 'LTTB'

janjakubnanista commented 6 years ago

@meteorpublish I will take a look at how the source code is transpiled into the resulting bundle, I guess that's where the issue lies. I only tested with node v9.1 so this went unnoticed

tredondo commented 6 years ago

Thanks. Same problem with Node v10.x.

janjakubnanista commented 4 years ago

The package build has been moved to rollup which should fix this issue and also make the package tree-shakeable