Skip to content

Address issue importing Blacklight module in masonry and slideshow javascript #202

@mamrey

Description

@mamrey

The import statement in the masonry and slideshow javascript modules fail to resolve.

Both files import the Blacklight module from 'blacklight-frontend' instead of 'blacklight'. This change to unify the Blacklight import became available on blacklight 9.X, and there is a draft PR to backport it to Blacklight 8.X, and specifically mentions spotlight.

Furthermore, the application.js entrypoint uses the blacklight 8.X import statement, i.e. `import Blacklight from 'blacklight'.

I suspect this may also be related to the issues with esbuild.

Even if we merge in the backport PR on blacklight 8, the import will still be broken for all previous versions of blacklight that the v4.X of this gem supports. Creating some sort of conditional way to import the module depending on blacklight version sounds overly complex. I think the best bet here is to align the Blacklight import in the masonry and slideshow js files to the Blacklight import generated in the application.js entrypoint

Metadata

Metadata

Labels

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions