Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

简易实现webpack常见loader和plugin,还未实现webpack底层框架

License

Notifications You must be signed in to change notification settings

summarychm/sample-webpack

Repository files navigation

实现一版简易的 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 文件夹

About

简易实现webpack常见loader和plugin,还未实现webpack底层框架

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /