Skip to content
This repository was archived by the owner on Jan 18, 2024. It is now read-only.

Updated webpack-config #409

Merged
merged 2 commits into from
Mar 8, 2019
Merged

Updated webpack-config #409

merged 2 commits into from
Mar 8, 2019

Conversation

EvanBacon
Copy link
Contributor

Moved from #407

  • Removed web polyfills
  • Udpated index.html style
  • Use primaryColor for msapplication navbutton-color
  • Moved WebpackDeepScopeAnalysisPlugin to common
  • Removed vendoring
  • Added support for .otf fonts
  • Removed custom optimization in favor of webpack defaults
  • Removed terser

* Removed web polyfills
* Udpated index.html style
* Use primaryColor for msapplication navbutton-color
* Moved WebpackDeepScopeAnalysisPlugin to common
* Removed vendoring
* Added support for `.otf` fonts
* Removed custom optimization in favor of webpack defaults
* Removed terser
@EvanBacon EvanBacon self-assigned this Mar 8, 2019
@EvanBacon EvanBacon requested a review from fson March 8, 2019 00:56
EvanBacon added a commit that referenced this pull request Mar 8, 2019
@EvanBacon EvanBacon requested a review from ide March 8, 2019 09:09
}

const publicPath = '/';
const publicPath = ''.replace(/\/$/, '');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just an empty string '', is that on purpose?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may be adding publicUrl for export right? If so then this will prevent // in the index.html. This looks a little strange out of context because I split it into 2 PRs.

@EvanBacon EvanBacon merged commit 9123915 into master Mar 8, 2019
@EvanBacon EvanBacon deleted the @evanbacon/web-polyfill branch March 8, 2019 20:09
facebook-github-bot pushed a commit to facebook/react-native that referenced this pull request Mar 11, 2019
Summary:
Initially if a `react-native-web` project were to use a library that required internals `expo/webpack-config` would polyfill those internals. This `Platform.web` was used for cases where `react-native` modules needed other internal `react-native` modules, ex: `Animated/src/AnimatedEvent -> Renderer/shims/ReactNative -> Renderer/oss/ReactNativeRenderer-dev -> Core/InitializeCore -> Devtools/setupDevtools -> WebSocket/WebSocket -> Utilities/Platform`

The consensus is that if any `react-native` library references a `react-native` internal (ex: `react-native/*`), it should continue to throw errors. We've removed the use of internals from all of the Unimodules, `react-navigation`, and `react-native-gesture-handler`. This covers a wide enough area for a lot of projects to get web support.

* Add emitters for libs referencing internals necolas/react-native-web#1275
* Remove monkey patch that bundles RN, libs that use internals will crash instead expo/expo-cli#409
* Remove all unsupported internals and polyfills from the Expo suite expo/expo#3676
* Remove internals from react-native-gesture-handler software-mansion/react-native-gesture-handler#406

* Related #23387

[GENERAL] [REMOVED] - Platform.web.js
Pull Request resolved: #23830

Differential Revision: D14406145

Pulled By: hramos

fbshipit-source-id: bdda99a334d33f5543fdb954eb80e2e7186f985a
EvanBacon added a commit that referenced this pull request Mar 12, 2019
* Moved `WebpackDeepScopeAnalysisPlugin` to common

* Removed vendoring

* Removed custom `optimization` in favor of webpack defaults

* Removed `terser-webpack-plugin`

* Update yarn.lock

* Added web compliation method to XDL

* Removed babel-preset-expo

* Cleaned up HTML

* Added bfj

* Fixed copy plugin

* Added `expo build:web`

* Update index.js

* Added `msapplication-navbutton-color`

* Added support for `otf`

* Moved to #409

* [WIP]

* Added build error for web

* Added dev flag to build command

* Added web error

* logging error on build:web

* Updated web stats

* Removed bfj

* Fixed prod builds

* Added `excludePolyfill` option to `expo build:web`

* Moved web error to XDL

* Updated stats promise

* excludePolyfill -> no-polyfill

* added woff format

* packages -> platforms

* Removed host option
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants