React-slick: module export change from commonjs to es6 is a breaking change.

Created on 21 Apr 2017  路  3Comments  路  Source: akiran/react-slick

We notice that 7 days ago the package module export way changes.(after ver 0.14.8)
from module.exports = Slider to export default Slider. This will cause the package which depend on react-slick using require('react-slick') fail to work, so this change should be a breaking change which is not expressed in npm package version.

the babel plugin add-module-exports can be used in your build process to have a better compatibility for both commonjs & es6 modules.

stale

Most helpful comment

This change should indeed be released as 1.15.* , as it's a breaking change, and for us it broke production for few minutes, cause in package.json we had react-slick: "^0.14.6" :)

anyway, another way to overcome it is to do:

var Slider = require('react-slick').default

All 3 comments

Agreed. This also causes the community-produced typings file to no longer be valid. NPM Build version should be upped to prevent breaking builds until people choose to go to the higher version.

This change should indeed be released as 1.15.* , as it's a breaking change, and for us it broke production for few minutes, cause in package.json we had react-slick: "^0.14.6" :)

anyway, another way to overcome it is to do:

var Slider = require('react-slick').default

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

enriquelopez-atlas picture enriquelopez-atlas  路  3Comments

jfamousket picture jfamousket  路  3Comments

nicreichert picture nicreichert  路  3Comments

rohitgoyal7 picture rohitgoyal7  路  3Comments

adamthewan picture adamthewan  路  4Comments