Installing Webpack

Webpack 可以透過 npm i webpack -g 指令安裝全域,不過在專案底下還是另外安裝開發用的比較適合。

安裝 Webpack 到專案資料夾:

npm i webpack --save-dev # or just -D if you want to save typing

安裝完成後可以在 package.json 的 devDependencies 區塊看見 webpack。同時也會產生一個 node_modules/ 資料夾,npm 也會產生執行用的 entry。

results matching ""

    No results matching ""