Closed lpfy closed 1 year ago
Have the same issue, ssr: false and works fine in Dev, production cant find chain.
Not possible as chain needs almost all lodash functions and they are tree shaken on build. You can try flow solution as mentioned here https://stackoverflow.com/a/45464732/10745364
@cipami
Perhaps it is possible to add a warning when using useChain. Please note that useChain cannot be used in a production environment (bundle missing).
If not warned in this way, we would realize, after completing a substantial amount of code, that everything is a mess only when we are waiting to release the Nuxt build version.
@cipami
Perhaps it is possible to add a warning when using useChain. Please note that useChain cannot be used in a production environment (bundle missing).
If not warned in this way, we would realize, after completing a substantial amount of code, that everything is a mess only when we are waiting to release the Nuxt build version.
I'm in that exact situation right now and could've adapted to that if I had known before
@cipami is there no way to tell the app to keep the "used sub functions" of chain? I only use 5-6 functions (uniq, reject, pick, omit, filter, map)
Hi there,
Just wondering does this plug-in support chain syntax? e.g. useChain(myArray).find({id: 2}).get("val").value()
I am facing a very strange issue, the code running fine when in Dev mode but not in production. Once SPA site generated, it doesn't like chain syntax. The error pops up as below:
TypeError: (intermediate value)(intermediate value)(intermediate value)(...).find is not a function
Nuxt3 example code - example.vue
Hopefully, someone can guide me to solve this issue, maybe a config problem??
Cheers