appbaseio / appbaseio/reactivesearch

Latest Vue Cli breaking

Offen
#1,915 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
4.9k
Forks
478
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.