I'm installing the service following the steps at the official docs: https://mswjs.io/docs/getting-started/install
This piece of code:
if (process.env.NODE_ENV === 'development') {
const { worker } = require('../tests/mocks/browser');
worker.start();
}
Uncaught ReferenceError: require is not defined
I've setup the project using Vite. What's the correct approach to solving this.