You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Importing nouislider as ESM does not work correctly for bundlers (eg. rollup). Example:
import { create } from 'nouislider';
create(htmlElement, { ... });
Results into following build time errors:
The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
"create" is not exported by "node_modules/nouislider/dist/nouislider.js", imported by filename
The problem is that resolving external dependency "nouislider" uses package.json, where path to module is not defined. So instead of using .mjs file the bundler tries to use .js file found in "main" key.
The text was updated successfully, but these errors were encountered:
mdorda
added a commit
to mdorda/noUiSlider
that referenced
this issue
Jun 14, 2023
Importing
nouislider
as ESM does not work correctly for bundlers (eg. rollup). Example:Results into following build time errors:
The problem is that resolving external dependency "nouislider" uses package.json, where path to module is not defined. So instead of using
.mjs
file the bundler tries to use.js
file found in "main" key.The text was updated successfully, but these errors were encountered: