You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know this is almost two years late, but I thought I'd leave this here in case anyone else winds up here looking for an answer. Galleria really doesn't play well with Webpack. The solution I came up with was to load the theme and initialize the plugin manually.
// theme.jsimportGalleriafrom'galleria'import$from'jquery'import'galleria/dist/themes/classic/galleria.classic.css'// Find the theme file you want to load (e.g. galleria.classic.js) and copy// the object in the Galleria.addTheme() call hereconsttheme={/* theme object */}exportdefaulttheme
If you're doing anything fancier than just loading a single instance this probably won't work quite right. Refer to the definition of $.fn.galleria and copy what you need.
I am trying to use Galleria with Webpack and I get the error:
I know Galleria and JQuery are working because I get on the console:
when using the following index.js:
The Webpack config is (I omitted some code for sake of simplicity):
What am I missing?
The text was updated successfully, but these errors were encountered: