You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
AFAICT you cannot shake the default export, even if it is not included in your project.
Repro: Basic Treeshaking
Just removing react-art saves 143kb (non-gzip).
Also noting that in an RNWeb project, omitting the library react-art does not build: Issue
Describe a solution you'd like
@ide has opened a PR to remove the default import from React Native proper facebook/metro#362
Use a plugin like deep-scope-analysis which will remove the default if there are absolutely no module.exports/requires. Unfortunately this means that react-art would still get bundled (amongst others).
Additional context
N/A
The text was updated successfully, but these errors were encountered:
EvanBacon
changed the title
Remove umbrella import
Remove default import
Feb 26, 2019
Remove the default export that was provided for compatibility with legacy
imports of React Native CommonJS modules. These patterns is no longer
supported:
```
import ReactNative from 'react-native';
const ReactNative = require('react-native');
```
Fix#1258
Is your feature request related to a problem? Please describe.
AFAICT you cannot shake the default export, even if it is not included in your project.
Repro: Basic Treeshaking
Just removing
react-art
saves 143kb (non-gzip).Also noting that in an RNWeb project, omitting the library
react-art
does not build: IssueDescribe a solution you'd like
@ide has opened a PR to remove the default import from React Native proper facebook/metro#362
We could then delete:
react-native-web/packages/react-native-web/src/index.js
Lines 218 to 325 in 8ce5750
Describe alternatives you've considered
Additional context
N/A
The text was updated successfully, but these errors were encountered: