vue-cli-3

How can I customize my Service Worker based on environment variables?

女生的网名这么多〃 提交于 2019-12-06 23:13:14
问题 Edit: This looks like a duplicate of this Unresolved Question. Do I mark this as answered, or delete? I am using InjectManifest from workbox-webpack-plugin inside a Vue CLI 3 app. The custom service worker that I am injecting into has handling for Firebase Cloud Messaging (FCM). I need to listen for messages from different senders based on my environment (local, staging, and production). Ideally, service-worker.js would look like this: importScripts('https://www.gstatic.com/firebasejs/4.8.1

Change default font in vuetify is not working (vue-cli 3) [Vuetify 1.X]

江枫思渺然 提交于 2019-12-05 23:46:30
问题 I'm aware of the question change-default-font-in-vuetify in SO, but it doesn't address my problem as it was posted before vue-cli-3 came out, so the ideas there don't apply here as that, the official docs from Vuetify on how to change themes and other options don't have any valid step for when the project is created with vue-cli 3. So far my attempts go like this: - vue create fooproject (using default config, but even if I don't use the default but cherrypick what I want in the project and

Vue Cli 3 Local fonts not loading

不羁的心 提交于 2019-12-05 13:13:07
When trying to load custom local fonts in Vue CLI 3 the fonts still will not appear. I am not receiving any error messages. The inspector shows the correct rule being loaded, but fonts are falling back to serif on #app. Fonts are not showing up in my dist folder anywhere. I have tried adding loaders in vue.config.js, changing url paths, and moving the @font-face rules around to different locations, changing the public path to ' ' and '/', importing scss into main.js. Font loading: @font-face { font-family: 'OpenSans-Regular'; src: url('/assets/fonts/OpenSans-Regular.eot'); src: url('/assets

How can I customize my Service Worker based on environment variables?

纵然是瞬间 提交于 2019-12-05 05:29:47
Edit: This looks like a duplicate of this Unresolved Question . Do I mark this as answered, or delete? I am using InjectManifest from workbox-webpack-plugin inside a Vue CLI 3 app. The custom service worker that I am injecting into has handling for Firebase Cloud Messaging (FCM). I need to listen for messages from different senders based on my environment (local, staging, and production). Ideally, service-worker.js would look like this: importScripts('https://www.gstatic.com/firebasejs/4.8.1/firebase-app.js'); importScripts('https://www.gstatic.com/firebasejs/4.8.1/firebase-messaging.js');

Add Jquery to Vue-Cli 3

假装没事ソ 提交于 2019-12-04 12:28:47
问题 I'm currently trying to add Jquery to my vue-cli project. I am aware of the missbehaviour it can produce, but anyway; Since there is no build/webpack.base.conf.js anymore I tried editing vue.config.js by adding: module.exports { ... chainWebpack: config => { config.plugin('define').tap(definitions => { definitions[0] = Object.assign(definitions[0], { $: 'jquery', jquery: 'jquery', 'window.jQuery': 'jquery', jQuery: 'jquery', _: 'lodash' }) return definitions }) } ... } or const webpack =

Change default font in vuetify is not working (vue-cli 3) [Vuetify 1.X]

帅比萌擦擦* 提交于 2019-12-04 04:04:49
I'm aware of the question change-default-font-in-vuetify in SO, but it doesn't address my problem as it was posted before vue-cli-3 came out, so the ideas there don't apply here as that, the official docs from Vuetify on how to change themes and other options don't have any valid step for when the project is created with vue-cli 3. So far my attempts go like this: - vue create fooproject (using default config, but even if I don't use the default but cherrypick what I want in the project and select the css-preprocessor as stylus manually it won't work) - vue add vuetify - it creates a plugin

VUE CLI-3 Project not working on IE-11

二次信任 提交于 2019-12-03 12:57:40
问题 I have created an project in vuejs using vue-cli3. It working fine on chrome browser but in IE-11 version blank screen is shown with the following error in console as mentioned in this link: https://drive.google.com/file/d/1QaNwK1ekI2BwFsFyjvgbSsvwHBCmlcAD/view?usp=drivesdk On clicking console error that I have pointed in above screenshot, it opens a screen as display in given link https://drive.google.com/file/d/1_QXVjcw3cmqeC70LfNyLcr__rnXVIZIh/view?usp=drivesdk with the error in mini

VUE CLI-3 Project not working on IE-11

谁都会走 提交于 2019-12-03 03:16:34
I have created an project in vuejs using vue-cli3. It working fine on chrome browser but in IE-11 version blank screen is shown with the following error in console as mentioned in this link: https://drive.google.com/file/d/1QaNwK1ekI2BwFsFyjvgbSsvwHBCmlcAD/view?usp=drivesdk On clicking console error that I have pointed in above screenshot, it opens a screen as display in given link https://drive.google.com/file/d/1_QXVjcw3cmqeC70LfNyLcr__rnXVIZIh/view?usp=drivesdk with the error in mini-toastr package: Here is my babel.config.js file code: module.exports = { presets: [ ['@vue/app', { polyfills

Specify a vue-cli vue.config.js location

橙三吉。 提交于 2019-12-01 20:11:19
问题 I have a vue.config.js file in my project's base directory. I'd like to move this next to my other config files in a /config/ folder. How can I specify the new location of this file for vue-cli ? 回答1: The environment variable VUE_CLI_SERVICE_CONFIG_PATH specifies the absolute path to vue.config.js . Relative paths for this variable fail on macOS (and probably other platforms). Example on command line: $ VUE_CLI_SERVICE_CONFIG_PATH=$PWD/config/vue.config.js npm run build Or in package.json : {

Specify a vue-cli vue.config.js location

醉酒当歌 提交于 2019-12-01 19:57:07
I have a vue.config.js file in my project's base directory. I'd like to move this next to my other config files in a /config/ folder. How can I specify the new location of this file for vue-cli ? The environment variable VUE_CLI_SERVICE_CONFIG_PATH specifies the absolute path to vue.config.js . Relative paths for this variable fail on macOS (and probably other platforms). Example on command line: $ VUE_CLI_SERVICE_CONFIG_PATH=$PWD/config/vue.config.js npm run build Or in package.json : { "scripts": { "build": "VUE_CLI_SERVICE_CONFIG_PATH=$PWD/config/vue.config.js vue-cli-service build" } } 来源: