Code Monkey home page Code Monkey logo

sample-webpack's Introduction

实现一版简易的 webpack

  • 0.基础配置

    • 修改 webpack 配置如 resolveLoader(方便调试)
    • 使用@ts-check 进行类型检查(vsc)
    • 定义 loader 的默认模板(vsc)
  • 1.实现常见 loader

    • banner-loader,支持 prefix, postfix, perStr, postStr 四个参数
    • babel-loader,支持基础的 es6 转 es5 功能
    • file-loader,支持 name 参数
    • url-loader,支持 limit 参数
    • less-loader
    • css-loader
    • style-loader
    • sprite-laoder 雪碧图功能,支持自定义后缀,与 file-loader 等冲突
    • raw-loader,支持 esModule 参数
  • 2.实现常见 plugin

    • FileListPlugin,支持 filename,unit(单位,kb/mb),precision(精度) 三个参数
  • 3.实现基础 webpack 功能

  • 4.完善 bundle.js 文件的分析与注释.

    • bundle-summary 文件夹

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.