-
Notifications
You must be signed in to change notification settings - Fork 75
How to solve this error? #156
Comments
As a workaround you can try function colorIsLight(color, differenceRange) {
let rgb = toRgb(color) // https://www.w3.org/TR/AERT#color-contrast
return ((rgb.r * 320 + rgb.g * 590 + rgb.b * 110) / 1000) > (differenceRange || 125) // suggested by w3
}
export default colorIsLight;
// Or, if even that doesn't work,
export { colorIsLight as default }; |
@nicolo-ribaudo both not working :/ |
I am hitting this same issue. |
starting with [email protected] i am getting the same error (for lots of different modules) |
If no one claims this issue before, I can start looking for a solution the 13th |
@BennyAlex @gauntface @arlac77 @Riim @petamoriken Are you using babel 6? ( |
@nicolo-ribaudo am using [email protected] |
version: '6.25.0' |
Working workaround: use Babel 7. |
Since in Babel 6 it is not supported to replace the argument of a default export declaration with an expression, use a custom "replaceWith" function which handles also that case. Fixes rollup#155, fixes rollup#156.
@nicolo-ribaudo npm install --save-dev [email protected] does not work. |
Sorry, [email protected]. Anyway, I opened a PR to fix this bug with Babel 6 (#158) |
@nicolo-ribaudo unfortunatelly the PR isnt merged yet and I need it now. But with babel 7 I get unexpected token in .vue files, but I excluded .vue files in rollup config :/ |
I get this error: (babel plugin) TypeError: Property declaration of ExportDefaultDeclaration expected node to be of a type ["FunctionDeclaration","ClassDeclaration","Expression"] but instead got "ExpressionStatement" src\colorIsLight.js
And my file colorIsLight:
The text was updated successfully, but these errors were encountered: