question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`expo start --no-dev --minify` mess up render and functionality of App

See original GitHub issue

Current behaviour

run expo start --no-dev --minify, select Android or iOS, Theme of the App is messed up switching between dark theme and light theme, Missing Icons (using FeatherIcons), Card inset margins goes to zero, Text theme is inconsistent and Button/FAB onPress does not work properly.

run expo start -c, select Android or iOS, App works fine as expected.

Expected behaviour

App should work in production mode same as in development mode.

Code sample

Screenshots (if applicable)

What have you tried

Your Environment

software version
android 29
react-native 0.63
react-native-paper 4.9.1
node 12.19.0
npm or yarn 1.22.5
expo sdk 41.0.1

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

1reaction
adilusman51commented, Jun 13, 2021

I am using expo to build react native app. When I test app in dev environment with expo start -c everything works fine, App renders fine and switching theme have effect through out the app. When I test app in prod environment with expo start --no-dev --minify, App renders incorrectly, switch theme does not take effect through out the app.

Removing plugins: ['react-native-paper/babel'] in the babel.config.js, and then running expo start --no-dev --minify, App again works fine and renders same as in the case of running expo start -c

0reactions
adilusman51commented, Feb 24, 2022

@tdotdm I have removed the plugins: ['react-native-paper/babel'] in the babel.config.js file, for both production and development environment. and it is working fine for me

Note: I am using Expo for my projects, and latest version of Expo SDK recommends to use their babel preset in babel.config.js. Following is the state of babel.config.js file in my project (Note that I have commented out the react-native-paper/babel section)

module.exports = function (api) {
	api.cache(true);
	return {
		presets: ['babel-preset-expo'],
		// env: {
		// 	production: {
		// 		plugins: ['react-native-paper/babel'],
		// 	},
		// },
		plugins: [ 'react-native-reanimated/plugin'],
	};
};

I hope this is helpful for you

Read more comments on GitHub >

github_iconTop Results From Across the Web

Expo app only broken in --no-dev --minify, how to debug?
When running my app with “expo start --no-dev --minify”, I get the error copied below. The error doesn't occur if I start expo...
Read more >
Minified React error #152 - how to resolve this? - Stack Overflow
I do npm run build and then npm run start. Still I am getting the same minified error, I tried to delete bundle.js...
Read more >
How to Minify JavaScript — Recommended Tools and Methods
Learn how to minify JavaScript and speed up your website. You'll also discover top JavaScript minification tools, including WordPress ...
Read more >
Bundling and Minification | Microsoft Learn
Select the Script tab and then select the Start debugging button. Select the bundle containing the JavaScript function you want to debug using ......
Read more >
The complete best practices for minifying CSS - LogRocket Blog
Why minify CSS? Across the board, source code minification reduces file size and can speed up how long it takes for the browser...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found