Hi, louis.
I found workaround. The size limit
warning is set by webpack. (doc) The default limit is 250000 bytes, so, let customize it.
First, generate webpack.config.js
with expo customize:web
command.
(doc)
Unfortunately, there is a possibility that the current version (3.0.10) of expo-cli has a bug and cannot execute the above command (already fixed in master branch). If you encounter this error, you can take the following steps instead of the original method.
- install
@expo/webpack-config
- create
webpack.config.js
file at next ‘Second’ step
Second, edit the webpack.config.js
as below.
const createExpoWebpackConfigAsync = require('@expo/webpack-config');
module.exports = async function(env, argv) {
const config = await createExpoWebpackConfigAsync(env, argv);
// Customize the config before returning it.
+
+ config.performance = {
+ ...config.performance,
+ maxAssetSize: 550000,
+ };
+
return config;
};
This setting should extend the size limit to 550000 bytes and resolve the issue.