vue-cli-3

Keeping asset and public path different in vue app for CDN

大城市里の小女人 提交于 2020-08-10 18:30:06
问题 vue has this option publicPath which lets an app to be deployed on subpath: foobar.com/my-path , making links and every asset accessible via it. From performance standpoint, I want to enable CDN on my application's assets. How can I use the URL specifically for assets (and not the hyperlinks)? Example: ./my-path/assets/app.js should become https://my-staging-cdn.com/my-path/assets/app.js ./my-path/url-2.html should remain the same The configuration below allows me to set the path and assets

How to create a multipage Vue.js application with pages on nested subdirectories by modifying vue.config.js?

拜拜、爱过 提交于 2020-07-22 05:52:31
问题 I have a multipage Vue.js application with working pages on domain/legal; domain/submit; etc. I've implemented that with the help of Vue.js' pages (i.e. customizing config.vue.js ) In other words, I'm all good making the above work. I'm now trying to implement further nested pages under a new subdirectory level (additionally to the ones I already have as per above). i.e. domain/org/profile1 domain/org/profile2 domain/org/profile3 Any way to make this work by customizing config.vue.js ?

Vue CLI's type checking service ignores memory limits

谁都会走 提交于 2020-07-18 04:39:25
问题 DevOps has requested that we limit our frontend builds to ~1GB of RAM, so that our Jenkins instance doesn't shut down. We use a standard @vue/cli project, with TypeScript. However, the TS type checking service ignores all attempts to limit its memory usage, which is always 2048 MB. I've tried disabling it and relying on fork-ts-checker-webpack-plugin but that introduces other problems. Based on what I found, this should work: $ NODE_OPTIONS=--max_old_space_size=1024 \ NODE_ENV=production \

Vue Cli 3 project won't generate manifest.json (PWA)

|▌冷眼眸甩不掉的悲伤 提交于 2020-06-27 08:47:25
问题 I have a Vue Cli 3 project with @vue/cli-plugin-pwa plugin installed and configured (in vue.config.js ), but when I run vue-cli-service build --modern no manifest.json is generated based on my config. I'm expecting to see a manifest.json that would contain, at the very least, the paths of the icons I specified. Maybe also the settings that I put in the vue.config.js . Am I doing something wrong or maybe my expectation of how the plugin should work doesn't match the actual behavior? How am I