appbaseio / appbaseio/reactivesearch
Latest Vue Cli breaking
- Dominant language
- JavaScript
- Stars
- 4.9k
- Forks
- 478
- PR merge metrics
- No merged PRs in 30d
Description
Hi
My team upgraded our vue project to the latest vue cli, and started seeing an error regarding the range slider component.
we experienced the following error:
Uncaught ReferenceError: process is not defined
at getComponents (ssr-a41dfea9.js:20:1)
at Module../node_modules/@appbaseio/reactivesearch-vue/dist/es/RangeSlider.js (RangeSlider.js:25:28)
and were able to trace it to this line of code
https://github.com/appbaseio/reactivesearch/blob/13a29bab1db06f9ccf5964c625f693bc106baba0/packages/vue/src/components/range/addons/ssr.js#L10
We found a workaround through vue.config, but adding the following lines:
`const webpack = require('webpack');` at the top of the file
`plugins: [ new webpack.ProvidePlugin({process: 'process', }) ]` added to configureWebpack
Wer'e not sure why this ssr related code is affecting us as we don't actually use nuxt or any other ssr setup, so think it may just be a result of the upgrade to vue cli and possibly its use of webpack 5..
Hopefully you can find a solution that doesn't require the change to the vue config
Thanks
Contributor guide
Research direction
Reproduce the error with the latest Vue CLI and inspect packages/vue/src/components/range/addons/ssr.js at line 10. Compare the build with and without the reported vue.config.js ProvidePlugin workaround; done means the RangeSlider works without requiring that application-level configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100