We’re building an Expo mobile app and a companion browser extension.
The extension will re-use most of the code. However, there are a couple of browser extension specific scripts, like the
With the default expo webpack config, the
./web/background.js file gets ONLY copied over the ‘web-build’ directory. However, I want to include it in the webpack compilation process, so that:
./web/background.jsI can import other modules (from
node_modulesand from the
Have this single file compiled to
./web-build/background.bundle.js, so we can reference it in the browser extension custom manifest file.
Can you please advice me how to leverage the @expo/webpack-config to achieve that?