Skip to content

Latest commit

 

History

History
35 lines (28 loc) · 505 Bytes

note.md

File metadata and controls

35 lines (28 loc) · 505 Bytes

使用webpack

初始化package.json

npm init -y 
  • 全局安装
npm install webpack -g
  • 本地安装
npm install webpack webpack-cli -D

webpack中所有文件都是模块

  • js模块 模块化(AMD CMD es6Module commonjs);

直接允许webpack

会执行node_modules对应的bin下的webpack.cmd

npx webpack

webpack

  • plugins
  • loader

css处理

npm install style-loader css-loader less less-loader stylus stylus-loader 
node-sass sass-loader -D