1. 프로젝트 생성하고 Webpack4 적용하기
1. 프로젝트 생성하고 Webpack4 적용하기
$ npm init -y $ vi package.json
{ "name": "react-redux-webpack4-babel7-material", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC"}$ mkdir src$ cd src$ vi index.html
<!DOCTYPE html><html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <title>Tutorial</title> </head> <body> <div id="root"></div> </body></html>
$ vi index.js
(function () { console.log("Hi!");}());$ npm install --save-dev webpack webpack-cli webpack-dev-server개발 서버 띄우기
자, 이제 webpack 의 기본 설정이 끝났습니다. 이제 개발 서버를 띄워봅시다!
짝짝짝! 👏🏻👏🏻
Last updated