loader
05_Webpack 여러 loader들
File Loader img파일을 모듈로 다루는 법을 알아보자. 저저번글부터 사용한 프로젝트에 assets파일을 하나 만들고 아무이미지나 두장 넣는다. npm i file-loader -D file-loader를 설치하고 { test: /\.(png|jpe?g|gif)$/i, //$는 끝을 의미 i는 대소문자를 가리지 않겠다는 의미 use: [ { loader: "file-loader", options: { name: "[contenthash].[ext]", // ext : 확장자 }, }, ], }, module의 rules에 위와같은 코드를 넣어서 loader를 적용시킨다. 이제 loader를 적용시키는법은 어느정도 익숙해졌을 것이다. //index.js import "normalize.css"; i..