@expo/webpack-config
Version:
The default Webpack configuration used to build Expo apps targeting the web.
19 lines • 772 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const env_1 = require("../env");
/**
* Inject the required aliases for using React Native web and the extended Expo web ecosystem. Optionally can also safely append aliases to a Webpack config.
*
* @param webpackConfig Existing Webpack config to modify.
* @param alias Extra aliases to inject
* @category addons
*/
function withAlias(webpackConfig, alias = {}) {
// Mix in aliases
if (!webpackConfig.resolve)
webpackConfig.resolve = {};
webpackConfig.resolve.alias = Object.assign(Object.assign(Object.assign({}, env_1.aliases), (webpackConfig.resolve.alias || {})), alias);
return webpackConfig;
}
exports.default = withAlias;
//# sourceMappingURL=withAlias.js.map