출처 : https://github.com/leehan0617/vue-admin-sample/blob/master/vue.config.js // cumstom webpack을 추가하기 위해선 vue.config.js 파일을 만들고 이곳에다가 plugin설정을 하면된다. const webpack = require('webpack') module.exports = { configureWebpack: (config) => { // 공통환경 config.plugins = [ ...config.plugins, new webpack.ProvidePlugin({ $: 'jquery', jquery: 'jquery', 'window.jQuery': 'jquery', jQuery: 'jquery', moment: 'mo..
vue-cli 3 에서 eslint 설정은 package.json 에서 설정 가능하다 예를 들어 jquery를 쓰고 싶다면 index.html에서 jquery를 CDN으로 넣고 package.json 파일에서 eslintConfig -> env -> "jquery": true 추가를 하면 됨. ex) "eslintConfig": { "root": true, "env": { "node": true, "jquery": true }, "extends": [ "plugin:vue/essential", "eslint:recommended" ], "rules": {}, "parserOptions": { "parser": "babel-eslint" } },
#Vue Cli 2 에서 설정 webpack,prod.conf.js 파일에서 removeAttributeQuotes: true, 를 removeAttributeQuotes: false, 로 변경 #Vue Cli 3 에서 설정 vue.config.js 파일 생성 후 1 2 3 4 5 6 7 8 9 10 module.exports = { chainWebpack: config => { if (process.env.NODE_ENV === "production") { config.plugin("html").tap(args => { args[0].minify.removeAttributeQuotes = false; return args; }); } } }; Colored by Color Scripter
설치 yarn add axios or npm install axios --save main.js import axios from 'axios' Vue.prototype.$http = axios 사용법 - get 방식 1 2 3 4 5 6 7 8 this.$http .get('api_url', { params: { name: 'TEST' } }) .then(res => { console.log(res); }) .catch(error => { console.log(error); }); Colored by Color Scripter cs - post 방식 1 2 3 4 5 6 7 8 9 10 11 12 13 let formData = new FormData(); formData.append('email', t..
# 설치 => vue-cli 3 npm -g install @vue/cli or yarn global add @vue/cli => vue init 명령어를 쓰고 싶으면 npm -g install @vue/cli-init or yarn global add @vue/cli-init # 프로젝트 생성 방법 3가지 - vue ui 명령어 실행 후 프로젝트 생성 - vue create - vue init webpack # 그 외 - 개발 서버 시작 npm run serve or yarn serve - build npm run build or yarn build
mac에서는 homebrew 라는 mac용 패키지 관리자가 있어 node, npm, yarn 등의 설치 및 관리가 쉬웠으나 window에서는 homebrew 같은 패키지 관리자가 없는 줄 알았다. 뭐 당연히 없는 줄 알고 안 찾아본 내 귀찮음이 문제였지만... 암튼 window에도 패키지 관리자가 있더라 ... 찾아보니까.. window에서 node나 npm, yarn 등을 설치할 때 가장 귀찮았던게 환경변수 설정이었다. 물론 자동으로 path 가 잡히면 좋은데 나 같은 경우에는 환경변수를 설정해야만 잡희드라...ㅠㅠ chocolatey 를 이용해서 node, npm, yarn 을 설치하니 안잡아도 되서 편하드라..ㅋㅋㅋ 그래서 자료로 남김. 우선 설치 방법 부터~ 1. 설치 cmd.exe 를 관리자 권..
Mac 에서 Homebrew 설치는 매우 간단하다 터미널을 실행한 후 아래의 명령어만 설치하면 끝 /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 1. Homebrew로 설치 brew install node brew install watchman brew install yarn 2. 업데이트 brew update node 3. 삭제 brew remove node #brew 주요 명령 brew install formula // 패키지 설치 brew remove formula // 패키지 삭제 brew info formula // 패키지 정보 brew upgrade [formula..
- Total
- Today
- Yesterday
- 인생샷명소
- 여자겨울코디
- 디지털디톡스
- 모토픽
- Widget
- 울하랑이
- Python
- 운전자보험
- 네이버페이적립
- Flutter
- 겨울데이트코스
- Mac
- Vue
- 짠테크
- React Native
- snackbars
- chatGPT
- 2025앱테크
- Java
- 재테크
- 다이소추천템
- 겨울레이어드룩
- 피드코인
- 2025겨울패션
- 자료형
- 더현대서울크리스마스
- 네이버피드코인
- 개발환경
- AI
- list
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |