RIPE SDK not compatible with Nuxt.js under Vercel #195
Labels
bug
Something isn't working
p-medium
Medium priority issue
unit-testing
Issue requires creation of unit tests
Description
It's not possible to use the RIPE SDK with Nuxt.js when building the application with
--standalone
, which is done by Vercel. Accessing the page where RIPE SDK is imported results in:This is caused by the "environment" detection part not being ready to this use case:
The values at play here are:
require
is defined__webpack_require__
is definedwindow
is NOT definedXMLHttpRequest
is NOT definedEven though
require
is available and would be able to importXMLHttpRequest
, the code is ending up inXMLHttpRequest = window.XMLHttpRequest;
which throws an error.Expected vs. Observed
Repro Steps
nuxt build --standalone
nuxt start
The text was updated successfully, but these errors were encountered: