I am migrating from raven-js to @sentry/browser for browsers, and I'm planning to use @sentry/node for nodejs. Because my project is universal, most of the JavaScript files are shared with browsers and nodejs.
This means I can't write import { captureMessage } from '@sentry/browser' nor import { captureMessage } from '@sentry/node' in the universal JS files.
FYI There's a 3rd party module for it: https://github.com/malectro/universal-sentry and it's package.json is good to start.