Git Product home page Git Product logo

Comments (1)

Apr2026 avatar Apr2026 commented on August 27, 2024 1

Webpack 的打包流程大致可以归纳为以下几个步骤:
初始化: 启动构建,读取与合并配置参数,加载 Plugin,实例化 Compiler。
编译: 从 Entry 出发,针对每个 Module 串行调用对应的 Loader 去翻译文件的内容,再找出该 Module 依赖的 Module,递归地进行编译处理。
确定 Chunk: 每个 Module 都编译完成后,根据 Module 之间的依赖关系,生成代码块(Chunk)。
生成 Bundle: 每个 Chunk 都转换成一个单独的文件加入到输出列表,这步是可以修改输出内容的最后机会。
输出完成: 确定好输出内容后,根据配置确定的路径与文件名,把文件写入到文件系统。

from daily-question.

Related Issues (20)

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.