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 }}
Repository navigation
Allow package.json to define what "ionic build" and "ionic serve" do in custom projects #3819
Looking at CLI 4.8.0, custom projects are hard-coded to always throw an error upon build/serve, without a way to define a custom build/serve process.
I would expect ionic build by default to run tasks that are not specific to Angular, such as auto-generating the app icon and splash screen assets, and allow a hook in the package.json of the project to run other custom build tasks if needed.
This is a small roadblock for Vue adoption.
Reacted by Simo Mafuxwana and Muhammad Ashraf Ishak
ionic build & ionic serve (and build/serve during Cordova/Capacitor commands) will now work using the vue-cli-service!
This will be in Ionic CLI 4.9.0. Thanks!
Reacted by Simo Mafuxwana, Muhammad Ashraf Ishak, Lore, cwe1ss, PipeSierra, Mick Cox, Patrick Labes, Ryu Nishimura, Viacheslav Bogdanov, Charlie Cline and 2 more
hello sir, I see that angular HMR here angular hmr have custom code like npm run hmr. Can I use ionic:build to npm run hmr. So my ionic cordova run android -l will become Hot module reload instead of live reload????
Activity
imhoffd commentedon Jan 18, 2019
Thanks, that makes sense. This was just an oversight.
imhoffd commentedon Jan 18, 2019
Just pushed a commit that makes this work with projects generated by the Vue CLI.
Choose
customduringionic init:ionic.config.jsonis generated.Make the following modifications to
package.json:"scripts": { + "ionic:build": "vue-cli-service build", + "ionic:serve": "vue-cli-service serve", "serve": "vue-cli-service serve", "build": "vue-cli-service build", "lint": "vue-cli-service lint" },ionic build&ionic serve(and build/serve during Cordova/Capacitor commands) will now work using the vue-cli-service!This will be in Ionic CLI 4.9.0. Thanks!
hiepxanh commentedon Jan 31, 2019
hello sir, I see that angular HMR here angular hmr have custom code like
npm run hmr. Can I useionic:buildtonpm run hmr. So myionic cordova run android -lwill becomeHot module reloadinstead oflive reload????imhoffd commentedon Jan 31, 2019
ionic:buildis not used withionic cordova run androidif that-lflag is used because that's for livereload.tomchiverton commentedon Feb 2, 2022
The main AppFlow Vue example project is missing these two lines :(