refactor(with-preact): upgrade to sdk 37

This commit is contained in:
Cedric van Putten
2020-04-22 17:44:01 +02:00
parent 628f8c6120
commit 8ce070ee3f
3 changed files with 25 additions and 9 deletions

View File

@@ -1,5 +1,10 @@
# Preact Example
<p>
<!-- Web -->
<img alt="Supports Expo Web" longdesc="Supports Expo Web" src="https://img.shields.io/badge/web-4630EB.svg?style=flat-square&logo=GOOGLE-CHROME&labelColor=4285F4&logoColor=fff" />
</p>
> 💡 The most updated info is in the Expo docs: [Using Preact](https://github.com/expo/expo/blob/master/docs/pages/versions/unversioned/guides/using-preact.md)
[Preact](https://preactjs.com/) is "a fast 3kB alternative to React" with the same modern API as React. Preact was created by [Jason Miller](https://twitter.com/_developit).

View File

@@ -1,16 +1,17 @@
{
"dependencies": {
"expo": "36.0.0",
"preact": "10.2.1",
"preact-responder-event-plugin": "1.0.14",
"expo": "37.0.7",
"preact": "10.4.1",
"preact-responder-event-plugin": "1.0.16",
"react": "16.9.0",
"react-dom": "16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz",
"react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz",
"react-native-web": "0.11.7"
},
"devDependencies": {
"@babel/core": "7.0.0",
"@expo/webpack-config": "0.10.11",
"babel-preset-expo": "8.0.0"
"@babel/core": "7.9.0",
"@expo/webpack-config": "0.12.0",
"babel-preset-expo": "8.1.0",
"webpack-bundle-analyzer": "3.7.0"
}
}

View File

@@ -1,7 +1,17 @@
const createExpoWebpackConfigAsync = require('@expo/webpack-config');
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
module.exports = async function(env, argv) {
const config = await createExpoWebpackConfigAsync({ ...env, report: true }, argv);
const config = await createExpoWebpackConfigAsync(env, argv);
// see: https://expo.fyi/webpack-report-property-is-deprecated
if (env.mode === 'production') {
config.plugins.push(
new BundleAnalyzerPlugin({
path: 'web-report',
}),
);
}
config.resolve.alias = {
...config.resolve.alias,