webpack ์ด๋ž€
ยท
Languages/JavaScript
webpack์ด๋ž€, ๋ชจ๋“ˆํ™”ํ•œ ์—ฌ๋Ÿฌ ๊ฐœ์˜ ํŒŒ์ผ์„ ๋ชจ์•„ ์ฃผ๋Š” ๋ฒˆ๋“ค๋Ÿฌ์ž…๋‹ˆ๋‹ค. ๋ฒˆ๋“ค๋Ÿฌ๋Š” ์ด ์™ธ์—๋„ 'Rollup'๊ณผ 'Parcel'์ด ์žˆ์Šต๋‹ˆ๋‹ค. ๋ชจ๋“ˆํ™”ํ•œ ํŒŒ์ผ ๊ฒฐํ•ฉ์€ ๋‹จ์ˆœํ•˜๊ฒŒ ํŒŒ์ผ์„ ๊ฒฐํ•ฉํ•˜๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋ฉฐ, ๋ชจ๋“ˆ์˜ ์˜์กด ์ƒํƒœ๋ฅผ ํ•ด๊ฒฐํ•˜๋ฉด์„œ ๋ฒˆ๋“คํ•ฉ๋‹ˆ๋‹ค. webpack์€ '.js' ํŒŒ์ผ ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ. css์™€ ์ด๋ฏธ์ง€ ๊ฐ™์€ ๋ฆฌ์†Œ์Šค๋ฅผ ๋ฒˆ๋“คํ•ด ์ฃผ๋Š” ๊ธฐ๋Šฅ๋„ ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹ค์–‘ํ•œ Loader๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด, ๋‹จ์ผ ํŒŒ์ผ ์ปดํฌ๋„ŒํŠธ vue, Pug์™€ Sass ๊ฐ™์€ ๋‹ค์–‘ํ•œ ํ˜•์‹์˜ ํŒŒ์ผ๋„ ์ฝ์–ด ๋“ค์ผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ฒ˜์Œ ์ฝ์–ด ๋“ค์ด๋Š” ํŒŒ์ผ(์—”ํŠธ๋ฆฌ ํฌ์ธํŠธ)์„ ์‹œ์ž‘์œผ๋กœ ์—ฐ๊ฒฐ๋œ ๋ฆฌ์†Œ์Šค๋ฅผ ๋ชจ๋‘ ๋ฒˆ๋“คํ•˜๋ฏ€๋กœ, ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์— ๋ถˆํ•„์š”ํ•œ ๋ฆฌ์†Œ์Šค๋Š” ์•Œ์•„์„œ ์ œ์™ธ๋œ๋‹ค๋Š” ์žฅ์ ๋„ ์žˆ์Šต๋‹ˆ๋‹ค. ์ฝ”์–ด ์ปจ์…‰์œผ๋กœ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค. Entry Output Loaders Plugi..