Don't bundle react-native dependencies
Summary: Make sure that `.native.js` modules resolutions are _NOT_ prefered over `.js` modules when building flipper or flipper plugins Reviewed By: jknoxville Differential Revision: D18297580 fbshipit-source-id: 73f9114d19eb0934cdf69d9668b582966aedc756
This commit is contained in:
committed by
Facebook Github Bot
parent
71573257ae
commit
6e69d20917
@@ -66,7 +66,7 @@ function compile(buildFolder, entry) {
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
resolver: {
|
resolver: {
|
||||||
blacklistRE: /\/(sonar|flipper-public)\/dist\//,
|
blacklistRE: /\/(sonar|flipper-public)\/dist\/|(\.native\.js$)/,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ function startMetroServer(app) {
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
resolver: {
|
resolver: {
|
||||||
blacklistRE: /\/(sonar|flipper)\/dist\//,
|
blacklistRE: /\/(sonar|flipper)\/dist\/|(\.native\.js$)/,
|
||||||
},
|
},
|
||||||
watch: true,
|
watch: true,
|
||||||
}).then(metroBundlerServer => {
|
}).then(metroBundlerServer => {
|
||||||
|
|||||||
@@ -45,8 +45,7 @@ import {persistReducer} from 'redux-persist';
|
|||||||
import {PersistPartial} from 'redux-persist/es/persistReducer';
|
import {PersistPartial} from 'redux-persist/es/persistReducer';
|
||||||
|
|
||||||
import {Store as ReduxStore, MiddlewareAPI as ReduxMiddlewareAPI} from 'redux';
|
import {Store as ReduxStore, MiddlewareAPI as ReduxMiddlewareAPI} from 'redux';
|
||||||
// @ts-ignore: explicitly need to import index.js, otherwise index.native.js is imported, because redux-persist assumes we are react-native, because we are using metro-bundler
|
import storage from 'redux-persist/lib/storage';
|
||||||
import storage from 'redux-persist/lib/storage/index.js';
|
|
||||||
|
|
||||||
export type Actions =
|
export type Actions =
|
||||||
| ApplicationAction
|
| ApplicationAction
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ async function compilePlugin(
|
|||||||
},
|
},
|
||||||
resolver: {
|
resolver: {
|
||||||
sourceExts: ['tsx', 'ts', 'js'],
|
sourceExts: ['tsx', 'ts', 'js'],
|
||||||
blacklistRE: /\/(sonar|flipper-public)\/dist\//,
|
blacklistRE: /\/(sonar|flipper-public)\/dist\/|(\.native\.js$)/,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user