Skip to content

Wayne-007/test-webPack4.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webpack本地安装

  • 安装本地的webpack
  • webpack webpack-cli -D

webpack可以进行0配置

  • 打包工具 -> 输出后的结果(js模块)
  • 打包(支持我们的js的模块化)

手动配置webpack

  • 默认配置文件的名字 webpack.config.js
  • 手动指定配置文件:npx webpack --config
  • package.json配置:
  •  "scripts": {
    
  •    "build": "webpack --config webpack.config.my.js"
    
  •  },
    
  •   npm run build
    
  • or
  •   npm run build -- --config webpack.config.my.js
    

html本地服务器

  • yarn add webpack-dev-server -D

  • or

  • npx webpack-dev-server //打包在内存中

  • package.json配置,webpack.config.js配置,npm dev run

About

webPack测试使用

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published