반응형
Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- webpack
- 중학교준비물
- 인체원소
- TypeScript
- HTTP란
- 타입스크립트
- 실천방법
- 새학기꿀템
- 대학생준비물
- 2026꿀템
- Javascript
- 쿠팡학용품
- vue store
- 2026AI도구
- DI
- enum
- Vue+Typescript
- TCP/IP
- 추천
- 의존성주입
- 2026종소세
- ECMAScript
- frontend
- 자기계발
- 유아식기추천 #이유식식기 #흡착식판 #아기빨대컵 #교정젓가락 #이유식스푼 #아기턱받이 #유아도시락 #이유식준비물 #육아템추천 #아기용품추천 #쿠팡추천 #육아맘필수템
- 새학기쇼핑
- 가성비학용품
- 인생꿀팁
- 환급금많이받는법
- 자바스크립트
Archives
- Today
- Total
끄적끄적
[VUE] vue-sfc-rollup로 npm 패키지 만들기 본문
반응형

먼저 버전에 문제가 있을수 있으니 nvm을 통해 최신버전으로 변경해 주세요.
https://nodejs.org/ko/
nvm install v14.17.1
vue-sfc-rollup 설치
npm install -g vue-sfc-rollup
sfc-init 실행
$ sfc-init
✔ Which version of Vue are you writing for? › Vue 2
✔ Is this a single component or a library? › Library
✔ What is the npm name of your library? … ts-class-enum
✔ Will this library be written in JavaScript or TypeScript? › TypeScript
✔ Enter a location to save the library files: … ./ts-class-enum
Init is complete, your files have been generated and saved into the directory you specified above.
Within that directory, you will find a sample SFC at src/lib-components/ts-class-enum-sample.vue.
**NOTE** Any components you wish to expose as part of your library should be saved in that directory, and
an entry must be added to src/lib-components/index.ts and ts-class-enum.d.ts so rollup is aware of it
and typescript users can receive proper support.
When you're ready, run npm run build to generate the redistributable versions.
폴더 이동 후 npm install실행
npm i
콤포넌트 또는 라이브러리 구현
npm run build 실행
반응형
'Front-end > Vue.js' 카테고리의 다른 글
| [VUE] Nuxt or Vue 프록시 설정 (0) | 2021.11.19 |
|---|---|
| [VUE+TYPESCRIPT] Vuex 타입스크립환경 스토어 아키텍처 정리 (0) | 2021.10.29 |
| [VUE] Vue+Typescript - Class based component (0) | 2021.06.06 |
| [VUE] vuex? store? 무엇일까? 왜 사용할까? (0) | 2020.04.19 |
| [Vue] vue cli를 이용해서 세팅하기 (0) | 2019.11.06 |
Comments
