Conditional compilation for index.template.html
-
Hi, is there any way to remove parts of index.template.html depending on mode? E.g. to include some php code only for SPA and not Cordova.
Alternatively, is it possible to configure quasar.conf.js to set minify to true for htmlWebpackPlugin to remove comments in Cordova mode (the PHP code is contained in <script>/…/</script>?
-
Hi, is there any way to remove parts of index.template.html depending on mode? E.g. to include some php code only for SPA and not Cordova.
I have done something like that to include a different .js in dev vs prod env, don’t know if you can test on SPA vs Cordova…
// index.template.html <% if (htmlWebpackPlugin.options.ctx.dev) { %> <script src="statics/js/meteor.bundle.dev.js"></script> <% } %>
-
@dobbel Fantastic, it worked! I checked for htmlWebpackPlugin.options.ctx.mode.spa.