Questions tagged [vue-cli-3]

1

votes
2

answer
565

Views

How can I tell Vue-cli where my app's entrypoint is?

My app is split into an API and a UI portion. Deployment strategy requires they share a package.json. The file structure looks like client/ src/ main.js api/ package.json vue.config.js I am using the standard vue-cli scripts. package.json 'scripts': { 'serve:ui': 'vue-cli-service serve', 'build:ui...
Caleb Jay
0

votes
0

answer
2

Views

How can I use proxyTable to make cross origin request in vue-cli?

I want to use proxyTable with axios in my vue-cli project. In my config/index.js, I put code like this: proxyTable: { '/getnews': { target: 'https://xx.xxx.xx.x' changeOrigin: true, secure: false, pathRewrite: { '^/getnews': '/getnews' } } } and in my request function, it goes like this: var url = '...
P1NK
1

votes
1

answer
373

Views

How to add PurifyCSS to Vue CLI 3 project in vue.config.js

I'm new to the world of Vue and can't seem to succeed in adding PurifyCSS to my Vue CLI 3 project with Webpack. I'm using Bootstrap and Scss and I want to reduce the size of Bootstrap by removing unused selectors. I've tried a million combinations of configs but cant seem to make it work. This is...
glazjoon
1

votes
0

answer
27

Views

Request delay when accessing proxied server from Chrome

I am using Vue.js's API proxying functionality (which internally uses http-proxy-middleware/http-proxy) to forward API requests to my localbackend server. I set it in vue.conf.js like so: module.exports = { devServer: { port: 8081, proxy: { '/api': { target: 'http://localhost:8080', xfwd: false } }...
Docent
1

votes
0

answer
96

Views

vue-cli-service: Is there a way to pass -p parameter to typescript compiler or linter using vue-cli-service?

I have a vue-cli 3 based project. Here is the include section of my tsconfig.json { 'include': [ 'src/**/*.ts', 'src/**/*.d.ts', 'src/**/*.tsx', 'src/**/*.vue' ] } The typescript linter also uses the same file. I need yarn lint command to also lint the files in tests directory. When I add the tests...
Kashif
1

votes
0

answer
276

Views

Bundle the vue dependency into a web component build using vue-cli 3

I'm using vue-cli 3 to bundle my vue components into web components, using a command simmilar like that: package.json 'build:wc': 'vue-cli-service build --target wc-async --name webcomponent-global 'src/components/*/*.vue'' This all works fine, however according to the docs you need a global vue dep...
Philip Feldmann
1

votes
1

answer
154

Views

How to use Vue web components (generated by Vue-CLI 3) inside another Vue project?

I Can Use web-components that generated by Vue-CLI 3 build command (vue-cli-service build --target wc --name foo ./src/App.vue) as a stand-alone component in a webpage like this: BUT When I import this component inside another Vue project: import Vue from 'vue' import foo from 'foo' I get this Erro...
Mahdi Aryayi
1

votes
0

answer
392

Views

Vue CLI 3: Sourcemaps cannot be parsed by Chrome devtools

I built my simple site using Vue UI (the ones that comes with Vue-CLI 3), and it created sourcemaps in the /dist folder. I deploy these sourcemaps along with the production files. When I load up my site, Chrome indicates it cannot parse the sourcemaps in Devtools. DevTools failed to parse SourceMa...
Stephen
1

votes
0

answer
198

Views

Import errors using sass files and pug with vue-cli 3

I'm trying to set up a Vue project using vue-cli 3.x, typescript, pug and .sass files. I also want to import a couple files globally so that they are available in all my components (I followed this guide) main.ts import Vue from 'vue' import App from './App.vue' import router from '@/router' import...
Giacomo
1

votes
1

answer
224

Views

Vue url changes on navigation

I am just getting started with Vue. I installed @Vue/Cli (that's version 3) and also cli-init so I can use version 2's commands. To create my project I used vue init webpack . While running the app on the browser I noticed strange behaviour; my routes are being changed! Initial Route 'localhost:80...
LeanKhan
1

votes
0

answer
454

Views

How can I read values from a static config.json file to TypeScript in a Vue file after running build:electron in Vue CLI 3?

Good afternoon. I was wondering whether it is possible to add a config.json file to a Vue CLI 3 project that can be read at runtime, both during development and production. The config.json file will contain some strings the app can use to change content dynamically, such as the video files that are...
stack145
1

votes
1

answer
798

Views

Vue js vuecli3 application does not work in ie11 (babel is not loading polyfills?)

The problem is my application is not working in IE11 i'm using vue-cli3 with babel polyfill 7 (with the browserlist in the package.json) on IE11 i'm getting a white screen with error 1003 in the console expected ':' When i try the command npx browserSlist i'm seeing IE11 so that works :) my babel.c...
1

votes
1

answer
649

Views

Check version of vuetify

I have not found anything about that. Regarding the very quick modifications from version to version: How to check which version of vuetify is installed?
daisyDuck
1

votes
0

answer
1k

Views

Vue CLI 3 + Typescript + TSLint and Vue 2.5.17

Good time of the day, Recently, i've decided to play around with Vue 2.5.17 and Typescript. Everything works fine, even compiles just fine and works, however: Imports of .vue files in WebStorm 2018.2 always result in the Cannot find module @/path-to-the-module Typescript always throw the same error...
Ivan Zhivolupov
1

votes
1

answer
281

Views

How to overwrite environment variables in Vue-cli3?

Let us assume we have a Vue.js project build with Vue-cli3 , package.json: { 'scripts': { 'serve': 'vue-cli-service serve', 'build': 'vue-cli-service build', ... } Also, we have a plan to push our project to a public repository on GitHub, so we need different environment variables for public repo an...
Kirill Sosnin
1

votes
0

answer
155

Views

Create webp images (as alternative version) from original images in Vue CLI 3

I have simple Vue project on newest Vue CLI 3 (I'm newbie on both). In src I have jpg / png images in 100% quality. By default cli while build will make dist directory with my images adding hash (image.jpg to image.7a97ca45.jpg) but without any compression. So I have added imagemin-webpack-plugin a...
lukchojnicki
1

votes
0

answer
181

Views

vue-cli 3.1.0 how to import commonjs module into typescript component

I'm trying to import some legacy code in commonjs format into a typescript translation unit that is associated with a vanilla-ish project created by vue-cli 3.1.0. The error I'm getting is from webpack. It appears that the typescript component wants to consume modules in ES6 format: ReferenceError:...
Sean K
1

votes
0

answer
388

Views

Deploying VueJS on google cloud

I am using Vue CLI 3 to create a web application with the following presets: babel, PWA, Vue Router, and css proprocessors. I am trying to deploy the application on Google Cloud's App Engine. How do I serve this? The tutorial on Google says I just have to do: gcloud app deploy in the root directory...
Kevin Patrick
1

votes
0

answer
29

Views

In the vue project created through vue-cli3, the ctrl + v feature of monaco-editor is invalid

i have created a vue project through cli3 (3.1.1 verion).And i installed monaco-editor(0.14.3).But in my page,the ctrl +v feature is invalid. Here is my code: import * as monaco from 'monaco-editor' export default { data () { return {} }, mounted () { this.editor = monaco.editor.create(docume...
Evil Cheng
1

votes
1

answer
109

Views

Win10, VirtualBox,Ubuntu, Vue-cli 3 - watching not working

I cloned project from github and deployment on VM. All works fine except watching if any file in project updating. VagrantFile have string to syn folder config.vm.synced_folder './', '/app', owner: 'vagrant', group: 'vagrant' Tried to add vue.config.js with module.exports = { configureWebpack: { dev...
maxxdev
1

votes
0

answer
242

Views

How can I generate multiple CSS files in Vue CLI 3?

I am just starting a new app with Vue CLI 3 and as part of the app we need to be able to support dynamic themes (loaded by host name). With this in mind, I'm trying to get the build to generate an additional CSS file for each theme. Currently I have 2 test themes set up and (weirdly) the theme file...
Keith Jackson
1

votes
0

answer
277

Views

How to remove stylush from Vuetify plugin and add Vuetify SCSS in Vue Js project

I installed vuetify plugin in my vuejs project. i am using vue cli 3. i selected vuetify recommended option to install. but i am already using SCSS in my project. vuetify added stylush. How can i remove stylush and use vuetify SCSS with best practice or do i need to start over from uninstalling vuet...
Ravi Anand
1

votes
0

answer
57

Views

server side rendering problem with vuejs cli 3

I am working on a vuejs app , and I am trying to use server side rendering, but I am having a problem with the rendering, but I am having this error when I start my server. [HPM] Error occurred while trying to proxy request /main.js from localhost:8080 to http://localhost:8081 (ECONNREFUSED) (https...
Mana
1

votes
1

answer
85

Views

Global shared variable vue.js using vue-cli-3

I have a base.scss under src/style/base.scss. This file has imports for all variables and mixins. When I serve my project using vue-cli-3 it says unknown variable $black. To solve it, I referred this https://cli.vuejs.org/guide/css.html#passing-options-to-pre-processor-loaders and added module.exp...
Harsh Karanpuria
1

votes
1

answer
285

Views

Webpack external library access with Vue web components

I create a web component with vue-cli.3 in order to use it in other projects with the following command: vue-cli-service build --target lib --name helloworld ./src/components/HelloWorld.vue The component has a dependency on lodash. I don't want to bundle lodash with the component because lodash is g...
Élodie Petit
1

votes
1

answer
72

Views

Vue js is deleting a script tag when compiled

I'm new with Vue.js and I'm having an issue that I can not solve.. I'm using Vue cli 3 and in my code I'm adding a custom tag (not a component) on my template with a script tag inside. This script goes to search the custom tag ra, so needs to be inside of the tag. The problem is that when I inspect...
Carlos RA
1

votes
1

answer
129

Views

How to configure PurgeCSS for vue-cli-3 projects with TailwindCSS? (including responsive classes)

I'm trying to deploy a vue-cli-3 project. I used TailwindCSS and created a vue.config.js file and it's working, but responsive classes are not being included. I searched about a regex, using a extractor in a webpack.config.js file but it didn't work. What should I do to have this working? Here's my...
lelukas
1

votes
0

answer
32

Views

Is there a way to import globally list of components from specific folder?

Instead of: import comp1 from './widgets/comp1.vue'; import comp2 from './widgets/comp2.vue'; import comp3 from './widgets/comp3.vue'; ... export default{ components: { comp1, comp2, comp3, ... }, If I don't wanna do Vue.use on eace component globally, how can I insert the full widgets folder for a...
AngularOne
1

votes
0

answer
71

Views

How to create web component using vue-cli

i want to create custom web component, so i can reuse this component to another project, it's work locally when i run yarn serve and then i publish it to npm, but when i import it to another vue project i got this error Github Page : https://github.com/point-red/vue-point-table vue.js:634 [Vue warn]...
martiendt
1

votes
1

answer
66

Views

Vue-Cli: 'title' option for htmlWebpackPlugin does not work

I'm using vue-cli (3.4.1) and I'm trying to simply change the title of the document. I added the following to the vue.config.js chainWebpack: (config) => { config .plugin('html') .tap((args) => { args[0].title = 'Custom Title'; return args; }); }, and inspected the webpack config with vue inspect --...
Kristof Komlossy
1

votes
0

answer
32

Views

Server returning 404 when Vue-Cli project served over tomcat

I have started a project using vue-cli and after my development process is done, I am trying to deploy it to my local server Tomcat. But when I deploy it by running 'npm run build' place the dist folder onto my webapps in tomcat and and go to the app using my ip-address I am not able to hit the pag...
charan teja
1

votes
0

answer
40

Views

What is the chunk-vendors.js file and how is it created? (Webpack)

I had a quick question regarding the chunk-vendors.js file that gets created during the build process for a Vue Js application. What is it? How is it created? The reason I'm asking is to better understand how certain things end up in it. I'm finding it actually has some stuff I don't want. Thanks!
1

votes
1

answer
59

Views

Vue.js - DOM element not removed from parent component after route change in

I'm facing a consistent behavior in vue.js and could not find any documentation describing it, and what I would like to know is if this behavior is expected or not. I'm developing an SPA using vue.js 2.6.8, @vue/cli-service 3.5.1, and vue-router 3.0.1. My routes look like this: { path: '/Users', nam...
marceloatg
1

votes
0

answer
21

Views

Allow a Vue Library accept scss to put into the vue.config.js file

I am trying to create a Vue.js component library, which will later be released on npm for future projects of mine to use it. However, I would like the components to have default scss variables, AKA variables marked with the !default flag. Then, whenever I use the component library in a new project I...
Secular12
1

votes
3

answer
51

Views

VueJs CLI 3 - how add external lib

I have a vue app created by latest vue CLI (vue 3.5.1) using this following command line: vue ui This is my folder structure: app_vue: |- node_modules |- public |- src: |---- assets |---- components: |---------List.vue |---- libs: |--------- pagination: |------------- css: |----------------- paginat...
wpuser000
1

votes
0

answer
41

Views

Vue CLI's type checking service ignores memory limits

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 disabl...
Filipe C.
1

votes
0

answer
49

Views

Vue CLI creates empty project

I installed the Vue CLI globally and tried to create a new project my package manager is npm my first git message is 'init' I add Babel, Router, Vuex, Linter, Unit Testing and config files manually I lint on save with Prettier My unit testing solution is Jest This is what I get: It only installs th...
Question3r
1

votes
1

answer
29

Views

Deployment issue w/Vue-cli3 and static site

New to vue and am using vue-cli3 to scaffold a simple authentication app for auth0, auth0-plugin.surge.sh. My router.js module is: import Vue from 'vue'; import Router from 'vue-router'; import Home from './views/Home.vue'; import Callback from './views/Callback.vue'; Vue.use(Router); const router =...
Alan
1

votes
0

answer
25

Views

Vue CLI 3 doesn't create .vuerc file

I'm using Vue CLI 3.5.1 on Ubuntu 16.04 to create some test projects. As per the doc, I should have a .vuerc file created in my Home directory. However, when I run: vue create test-project no such file is created. Projects work fine but running vue config gives the following error: lundin[email protected]
LundinCast
1

votes
0

answer
30

Views

Vue Cli 3 Local fonts not loading

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...
P. Jack

View additional questions