Skip to content

Jesonhu/webpack-usage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  • npm init -y 快速生成 package.json
  • 本地安装 webpack webpack-cli: npm i webpack webpack-cli -D
  • 本地安装 babel-core babel-loader: babel-loader 需要安装 babel-core

    babel-loader@8 requires Babel 7.x (the package '@babel/core'). If you'd like to use Babel 6.x ('babel-core'), you should install 'babel-loader@7'.

  • 本地安装 css-loader style-loader
  • 处理scss: node-sass sass-loader scss

编译

# webpck --mode=development
npm run dev

参考资料