Extending the official guide, this is a sample in-browser app trying to configure webpack to handle node:
protocol, with @sap-cloud-sdk/connectivity
as a simple consumption example.
- Clone the repo,
nvm use && npm i
. - In the default master branch,
npm start
.- It will fail with:
Module build failed: UnhandledSchemeError: Reading from "node:url" is not handled by plugins (Unhandled scheme). Webpack supports "data:" and "file:" URIs by default. You may need an additional plugin to handle "node:" URIs.
- It will fail with:
- Switch to
feat/handle-node-protocol-imports
branch andnpm start
.- It will be compiled and hosted successfully with
name: foobar
as display string oftoDestinationNameUrl({ destinationName: 'foobar' })
.
- It will be compiled and hosted successfully with