Git Product home page Git Product logo

webpack-workshop's Introduction

Webpack

(current version: 5)

v4: https://frontendmasters.com/courses/webpack-fundamentals/

Handbook: https://github.com/yuhaoju/webpack-config-handbook https://githubhelp.com/captainhou/webpack-config-handbook

Helps to deliver and build moduleable web application with JS.

Important aspect of modules

  • CommonJS
  • RequiredJS
  • UMD - Universal Module Definition
  • AMD - Asynchronously Module Definition
  • ESM - EmaScript Modules

Why? Choosing ESM (import - export) By abstracting the modules into its own layer - the manage to solve async nature (module deferring). Code splitting, tree-shake-ability… Things that others modules pattern wouldn’t be possible to build

Understanding ESM https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c#file-esm-package-md

https://webpack.js.org/plugins/module-federation-plugin/

  • Mode

    • Depending on the mode type - Webpack built-in optimizations that correspond
    • Type: development | productions (default) | none
  • Entry

    • It’s the file that you want to use to build a bundle
  • Output

    • It’s where and how you want to put to you builded bundle
  • Loaders

    • Tells Webpack how to treat a set of files before add include them as a dependency
    • Function which modify files
    • Transform the files
  • Chaining loaders:

    • Files can be treat by a list of loaders in a expecific other
  • Rules

    • Tells Webpack what need to do to a set files
  • Plugins

    • Allow us to communicate the Webpack’s compilation process
    • Allows full access to the compiler and the current compilation
  • Presets

    • Is a preconfigure Webpack rules or modules or plugins

webpack-workshop's People

Contributors

iocedano avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar  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.