I’m working on a an app which uses the create-react-app tool to manage the configuration of Babel and webpack. The front-end code runs fine both in development (
react-scripts start) and production (
react-scripts build). Adding in remotestorage.js works fine in development. However, after running
react-scripts build, the built app fails to start, with the error:
Uncaught TypeError: Cannot call a class as a function at e.exports (classCallCheck.js:3) at new e (cachinglayer.ts:26) at o.<anonymous> (createSuper.js:15) at new o (indexeddb.ts:60) at e.featuresLoaded (features.ts:204)
I’m pulling Remote Storage with
import RemoteStorage from 'remotestoragejs'; so I believe Babel is transpiling the code.
Can anyone suggest an approach to resolving this? I could run
react-scripts eject, and tinker with the Babel config, but I’m loathe to increase the time I spend on admin work.