Loading...
2020. 7. 14. 01:26

webpack 으로 boilderplate만들기 - 2 (plugin 설치하기)

# html-webpack-plugin html파일에 css파일과 js파일을 따로 불러와야하죠. 근데 이 플러그인은 빌드시 자동으로 html파일에 불러와줍니다 아웃풋으로 html파일을 생성해요 설치해줍니다 npm install --save-dev html-webpack-plugin webpack.config.js 수정해줍니다 const path = require("path"); const HtmlWebpackPlugin = require("html-webpack-plugin"); module.exports = { mode: "development", entry: { test: "./src/app.js", }, output: { path: path.resolve(__dirname, "./dist"), fi..

2020. 7. 14. 00:31

Webpack으로 boilerplate 만들기 - 1 (webpack, babel 설정하기)

# webpack - package.json 파일 생성하기 npm init -y - webpack에 필요한 모듈 설치하기 npm i webpack webpack-cli path --save-dev --save-dev를 끝에 붙여주면 package.json의 devDependencies에 잘 추가가 된 것을 확인할 수 있습니다. package.json { "name": "tistory_blog", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC"..