Hi, i converted my project to be able to write in typescript, but isn’t building, it reloads with livereload but the changes in the ts file aren’t reaching the browser, which makes me belive that it’s fault of the compiler used or something.
Right now the only way to update the changes i could find is canceling the ionic serve -s -c command and restarting it again, is the build watch wrong?
Reverting to js fix it, maybe i break it when changing to typescript.
I’m having the same problem here. The difference is that it doesn’t help to restart ionic serve.
I write my code, and my cmd window says that my ts files are changed. My app reloads in my browser, and things seem fine.
Then i notice that things haven’t really changed. The new code doesn’t seem to be added to the app.bundle.js file. I did some change today, and checked the file in finder on my mac, and it says that the file haven’t been updated since November 13th.
I am new to this, and really have no idea where to look, to find the reason why the new code i write in my ts-files never actually makes it to my browser. Does anyone have any idea where i can start looking?
Am not very familiar with webpack and all the different loaders. So by elemination, I figued out after a whole day of head-smashing that for my case it was the webpack.config.js file setting. It needs to be:
useWebpackText: false
The repo comes with the flag set to ‘true’, which allows a refresh only once, and after that does not copy the app.bundle.js file into the build directory anymore.
Didn’t check any of the watch limits as suggested in other posts…just changing this setting was enough.
so what is the official process for updating existing projects? replacing webpack.config.js i am seeing that even when I add new .ts files to my project that I need to add a new entry to webpack? Not seeing the same behavior when writing plain angular2 apps
Best way I’ve found is to ionic start newapp -v2 then merge webpack.config.js and package.json from the new to your existing app. Remove node_modules folder and $ npm install
For me my changes were not triggering the compile task because I had capitals in my path name.
I had:
import { Navigation } from ‘./…/…/providers/Navigation/Navigation’;
Changing it to
import { Navigation } from ‘./…/…/providers/navigation/navigation’;
fixed it.
Strange thing it still loaded the module so it was hard to spot what was wrong.
I have a problem.When i change in html ,ts file in App/pages whatever the changes done not updated in www/build/pages and not even it shows changes in node terminal.
even when using ionic serve,web view project dosent show the changes
I found the solution, in case somebody else has same problem
in package.json I update “@ionic/app-scripts” from 0.0.43 to 0.0.44 and then npm install
"devDependencies": {
"@ionic/app-scripts": “0.0.44”,