reactivesearch
reactivesearch copied to clipboard
Latest Vue Cli breaking
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
apparently its related to this : https://stackoverflow.com/questions/65018431/webpack-5-uncaught-referenceerror-process-is-not-defined.
Hello, I follow the quick start guide and get the same bug.
To bootstrap the project I use npm init vue@2
which uses vitejs instead of webpack.
Thus the solution for webpack users does not help.
Update: This vitejs workaround helped.