분류 전체보기
-
React - 개발환경 셋팅React/Settings 2021. 5. 30. 20:30
nodejs 설치 https://nodejs.org/ko/ Node.js Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. nodejs.org NVM 설치(Node Version Manager) https://github.com/coreybutler/nvm-windows coreybutler/nvm-windows A node.js version management utility for Windows. Ironically written in Go. - coreybutler/nvm-windows github.com Chrome 설치 https://www.google.co.kr/chrome/?brand=CHBD&gclsrc=aw...
-
Webpack - 프로젝트 설정Bundler/Webpack 2021. 5. 30. 13:00
npm init -y npm i -D webpack webpack-cli webpack-dev-server@next webpack-dev-server는 webpack-cli 와 메이저 버전을 일치시켜야 하기 때문에 @next 추가 package.json 설정 // package.json { "name": "webpack-bundler", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "dev": "webpack-dev-server --mode development", // 개발용 서버 실행 "build": "webpack --mode production" // 빌드 }, "dependencies": { "webpack": ..
-
Parcel - BabelBundler/Parcel 2021. 5. 30. 00:02
Babel ECMAScript 2015+ 코드를 이전 JavaScript 엔진에서 실행할 수 있는 이전 버전과 호환되는 JavaScript 버전으로 변환하는데 주로 사용되는 무료 오픈 소스 JavaScript 트랜스 컴파일러 npm i -D @babel/core @babel/preset-env .babelrc.js 파일 생성 .babelrc.js 설정 후 package.json의 browserslist 옵션에 설정된 내용에 영향을 받음 // .babelrc.js module.exports = { presets: ['@babel/preset-env'], }; // package.json { "name": "parcel-bundler-study", "version": "1.0.0", "description"..
-
Parcel - autoprefixerBundler/Parcel 2021. 5. 29. 23:45
npm i -D postcss autoprefixer pacakge.json에 browserslist 옵션 설정 browserslist 옵션은 현재 NPM 프로젝트에서 지원할 브라우저의 범위를 명시하는 용도 이 옵션을 autoprefixer 패키지가 활용하게 됨 // 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": { "autoprefixer": "^10.2.6", "parcel-bundler..
-
Parcel - 정적 파일 연결(이미지, favicon)Bundler/Parcel 2021. 5. 29. 23:23
favicon 이미지 추출 https://icoconvert.com/ 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" }, "devDep..
-
Parcel - 프로젝트 설정Bundler/Parcel 2021. 5. 29. 23:15
npm init -y npm i -D parcel-bundler package.json에 scripts 설정 "dev": "parcel index.html" // 개발용 서버 실행 "build": "parcel build index.html" // 빌드 // 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 CLI http..
-
Bootstrap - Optimize(최적화)Bootstrap 2021. 5. 29. 21:10
https://getbootstrap.com/docs/5.0/customize/optimize/ Optimize Keep your projects lean, responsive, and maintainable so you can deliver the best experience and focus on more important jobs. getbootstrap.com 예) Dropdown 컴포넌트 최적화 bundle로 import 하던 것을 Dropdown만 import 하도록 변경 Dropdown 초기화 https://getbootstrap.com/docs/5.0/components/dropdowns/#via-javascript bundle로 import를 하지 않기 때문에 popperjs 모듈 설치 ..