minhtranite / react-photoswipe

PhotoSwipe, PhotoSwipeGallery component for ReactJS base on PhotoSwipe.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Initialization Error

Jhays10 opened this issue · comments

When trying to implement the module into our project we are running into some issues.

[1] /{project-name}/node_modules/react-photoswipe/node_modules/photoswipe/dist/photoswipe.css:6
[1] .pswp {
[1] ^
[1] SyntaxError: Unexpected token .
[1]     at exports.runInThisContext (vm.js:53:16)
[1]     at Module._compile (module.js:413:25)
[1]     at Module._extensions..js (module.js:448:10)
[1]     at Object.require.extensions.(anonymous function) [as .js] (/{propject-name}/node_modules/babel-core/lib/api/register/node.js:214:7)
[1]     at Module.load (module.js:355:32)
[1]     at Function.Module._load (module.js:310:12)
[1]     at Module.require (module.js:365:17)
[1]     at require (module.js:384:17)
[1]     at Object.<anonymous> (/{project-name}/node_modules/react-photoswipe/lib/PhotoSwipe.js:29:1)
[1]     at Module._compile (module.js:430:26)
[1]     at Module._extensions..js (module.js:448:10)
[1]     at Object.require.extensions.(anonymous function) [as .js] (/{project-name}/node_modules/babel-core/lib/api/register/node.js:214:7)
[1]     at Module.load (module.js:355:32)
[1]     at Function.Module._load (module.js:310:12)
[1]     at Module.require (module.js:365:17)
[1]     at require (module.js:384:17)
[1]     at Object.<anonymous> (/{project-name}/node_modules/react-photoswipe/lib/index.js:5:21)
[1]     at Module._compile (module.js:430:26)
[1]     at Module._extensions..js (module.js:448:10)
[1]     at Object.require.extensions.(anonymous function) [as .js] (/{project-name}/node_modules/babel-core/lib/api/register/node.js:214:7)
[1]     at Module.load (module.js:355:32)
[1]     at Function.Module._load (module.js:310:12)

It looks to be that you are requiring the stylesheets in your module. Instead of that, it would be best to allow the user to decide where the styles are loaded from.

Thoughts?

Please update to version 0.2.0 and read it.