Skip to content

Commit

Permalink
fix: Solve metro-config detection issue
Browse files Browse the repository at this point in the history
  • Loading branch information
fguitton committed Aug 16, 2021
1 parent d3e74ed commit b964a80
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/mobile/metro.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
const merge = require('deepmerge');
const isPlainObject = require('is-plain-object');
const { getDefaultConfig } = require('@expo/metro-config');
const merge = require('deepmerge');

const baseConfig = getDefaultConfig(__dirname);
const config = merge(baseConfig, {
transformer: {
minifierConfig: {
ecma: 8,
compress: {
drop_console: true
},
keep_classnames: true,
keep_fnames: true,
mangle: {
Expand All @@ -19,7 +21,7 @@ const config = merge(baseConfig, {
assetExts: ['txt', 'ttf', 'png']
}
}, {
isMergeableObject: isPlainObject
arrayMerge: (target, source) => Array.from(new Set([...source, ...target]))
});

module.exports = config;

0 comments on commit b964a80

Please sign in to comment.