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
{{ message }}
This repository was archived by the owner on May 1, 2020. It is now read-only.
My build created using --prod and --release flags gets stuck at startup due to the following error which I captured in logcat.
file:///android_asset/www/build/main.js: Line 29 : Uncaught Error: Module build failed: Error: ENOENT: no such file or directory, open '/Users/***/ionic2app/src/pages/react-page/react-page.js' at Error (native)
What behavior are you expecting?
The build to work like a normal --release build with the --prod optimizations
Steps to reproduce:
Created a custom webpack config and added it to my package.json like this...
Created a page, imported react and changed the file extension to tsx to I can use react's render functionality. When I run "ionic run android", it is able to build a debug version of the app and run on my device. I can also run "ionic build android --release" to build an unsigned apk. But when I run "ionic build android --release --prod" to optimize my ionic2 app, the app has an error inside the assets/www/build/main.js file saying that my page.js is missing. It seems like it didnt get added to my bundled main.js properly.
Which @ionic/app-scripts version are you using?
1.1.4
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
My ionic version is....
"ionic-angular": "2.1.0"
The text was updated successfully, but these errors were encountered:
Here's a repo that can reproduce my error. You may try and run "ionic run android --prod" and see the error in the console once the app is launched. Am I importing React correctly?
Update: I've managed to solve my issue by ditching my tsx file and importing react in a different way. I've updated my repo with the fix in case anyone else is interested in how I solved it.
Short description of the problem:
My build created using --prod and --release flags gets stuck at startup due to the following error which I captured in logcat.
file:///android_asset/www/build/main.js: Line 29 : Uncaught Error: Module build failed: Error: ENOENT: no such file or directory, open '/Users/***/ionic2app/src/pages/react-page/react-page.js' at Error (native)
What behavior are you expecting?
The build to work like a normal --release build with the --prod optimizations
Steps to reproduce:
Which @ionic/app-scripts version are you using?
1.1.4
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
My ionic version is....
"ionic-angular": "2.1.0"
The text was updated successfully, but these errors were encountered: