Git Product home page Git Product logo

loots-webpack's Introduction

loots-webpack

记录 webpack 常用配置

基础配置:webpack.base.js

  • 资源解析
    • 解析 ES6
    • 解析 React
    • 解析 Vue
    • 解析 css
    • 解析 less
    • 解析 sass
    • 解析 图片
    • 解析 字体
  • 样式增强
    • css 前缀补齐
    • css px 转 rem
  • 目录清理
  • 多页面打包
  • 命令行信息显示优化
  • 错误捕获和处理
  • css 提取成一个单独的文件

开发配置:webpack.dev.js

  • 代码热更新
    • css 热更新
    • js 热更新
  • sourcemap

生产配置:webpack.prod.js

  • 代码压缩
  • 文件指纹
  • Tree Shaking
  • scope Hostiong
  • 速度优化
    • 基础包 CDN
  • 体积优化
    • 代码分割

SSR 配置:webpack.ssr.js

  • output 的 libraryTarget 设置
  • css 解析 ignore

loots-webpack's People

Contributors

sworlife avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.