pulibrary / lux-design-system

Princeton University Library's design system
https://pulibrary.github.io/lux-design-system/
1 stars 1 forks source link

Vuex Gallery module should be exported for the npm bundle #200

Open sdellis opened 5 months ago

sdellis commented 5 months ago

Expected behavior

When the following command is run on figgy, a build without errors is expected:

bin/vite build --clear --mode=development

Actual behavior

The build fails with this error message:

"modules" is not exported by "node_modules/lux-design-system/dist/lux-styleguidist.mjs"

Steps to replicate

Checkout the figgy/6294-vue-lux-upgrade branch and run bin/vite build --clear --mode=development

Impact of this bug

We are unable to upgrade Figgy to the latest version of LUX since it uses the gallery Vuex module.

Implementation notes, if any

Lux may need an export statement, like this: https://github.com/pulibrary/lux-design-system/blob/main/src/index.js#L22

sandbergja commented 4 months ago

I'm curious if there's a way we could make Vuex easily available for figgy, but not necessarily include it in the default lux export. I ran into an issue when adding lux to the departmental blog (which doesn't actually need Vuex). Vuex errored because it thought it was in a node enviornment rather than a browser, so we needed to trick it in order to use Lux.

sdellis commented 4 months ago

@sandbergja yes, I have been having issues with the Gallery component in Figgy. I had to migrate the Gallery component to the local Figgy code to get it to work as it won't work from the NPM package.

I am wondering if we simply don't do any state management in LUX? 🤔