-
Parcel - 정적 파일 연결(이미지, favicon)Bundler/Parcel 2021. 5. 29. 23:23
- favicon 이미지 추출
- Parcel build 시 dist 폴더 생성
- 정적 파일이 자동으로 dist 폴더에 삽입되어야 함
- npm install -D parcel-plugin-static-files-copy
- https://www.npmjs.com/package/parcel-plugin-static-files-copy
// package.json { "name": "parcel-bundler-study", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "dev": "parcel index.html", "build": "parcel build index.html" }, "devDependencies": { "parcel-bundler": "^1.12.5", "parcel-plugin-static-files-copy": "^2.6.0", "sass": "^1.34.0" }, "staticFiles": { "staticPath": "static" } }
- package.json에 staticFiles 옵셜 설정
- staticPath: "static"
- static 폴더 안에 정적 파일 이동
'Bundler > Parcel' 카테고리의 다른 글
Parcel - Babel (0) 2021.05.30 Parcel - autoprefixer (0) 2021.05.29 Parcel - 프로젝트 설정 (0) 2021.05.29