Closed themastersoda closed 7 years ago
Please try updating to ionic-app-scripts to 0.0.48
This issue was moved to driftyco/ionic-app-scripts#594
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Ionic version: (check one with "x") [ ] 1.x [ x] 2.x
I'm submitting a ... (check one with "x") [x ] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior: Building for device with modified main.ts fails. If
platformBrowserDynamic().bootstrapModule(AppModule);
is not in the top level, of the file, build gives an error.Expected behavior: Correctly check for bootstrapping code in main.ts, even if it is not in the top-level
Steps to reproduce: I am building an application based on https://github.com/Urigo/Ionic2CLI-Meteor-WhatsApp I have successfully modified custom webpack.config according to the one provided in latest app-scripts version (0.0.47).
Related code:
My main.ts looks like this:
Running
ionic serve
with this works, however,ionic build
gives an error during ngc phase:After extracting the code from Meteor.startup to the top level, build finishes without any problems.
Other information: none
Ionic info: (run
ionic info
from a terminal/cmd prompt and paste output below):