color-js / color.js

Color conversion & manipulation library by the editors of the CSS Color specifications
https://colorjs.io
MIT License
1.93k stars 81 forks source link

Name collision in `/fn` #171

Closed sgomes closed 2 years ago

sgomes commented 2 years ago

Looks like chromaticity.js and interpolation.js both have an export named register. This becomes a problem because they both get re-exported with * from index-fn.js:

export *                      from "./luminance.js";
export *                      from "./chromaticity.js";

Sample webpack error:

ERROR in ./node_modules/colorjs.io/src/index-fn.js 20:0-55
The requested module './chromaticity.js' contains conflicting star exports for the name 'register' with the previous requested module './luminance.js'
 @ ./src/index.js 1:0-52

ERROR in ./node_modules/colorjs.io/src/index-fn.js 24:0-56
The requested module './interpolation.js' contains conflicting star exports for the name 'register' with the previous requested module './luminance.js'
 @ ./src/index.js 1:0-52
LeaVerou commented 2 years ago

Fixed with #172