minhtranite / react-photoswipe

PhotoSwipe, PhotoSwipeGallery component for ReactJS base on PhotoSwipe.
322 stars 106 forks source link

Solving PhotoSwipe lib and Component name clash #22

Closed guilherme closed 6 years ago

guilherme commented 7 years ago

When using webpack since react-photoswipe loads photoswipe, it will try to load the actual photoswipe when loading the component, producing the following warning and errors in the console when loading the library:

22:10:15 webpack.1        | WARNING in ./~/react-photoswipe/lib/PhotoSwipe.js
22:10:15 webpack.1        | There is another module with an equal name when case is ignored.
22:10:15 webpack.1        | This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
22:10:15 webpack.1        | Rename module if multiple modules are expected or use equal casing if one module is expected.
22:10:15 webpack.1        | 
22:10:15 webpack.1        | WARNING in ./~/react-photoswipe/lib/photoswipe.js
22:10:15 webpack.1        | There is another module with an equal name when case is ignored.
22:10:15 webpack.1        | This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
22:10:15 webpack.1        | Rename module if multiple modules are expected or use equal casing if one module is expected.
22:10:15 webpack.1        | webpack: bundle is now VALID.