Webpack
โ legacy production industry standard to Bundle Web App - slow clunky reliable ๐ฑโ๐, deep config
Source: webpack.js.org/
webpack.config.js
โ
Manifest to config Webpack behavior
add Plugins to modify Webpack default behaviour
NpmInstallWebpackPluginโ
!auto-fixes missing dependencies by installing modules from NPM
Example Webpack snippet for commonJS module
var webpack_modules = {
"./src/message.js": (module) => {
module.exports = "Hello World";
},
};
function webpack_require(moduleId) {
var moduleFn = webpack_modules[moduleId];
var module = { exports: {} };
moduleFn(module);
return module.exports;
}
const message = webpack_require("./src/message.js");
console.log(message);
TerserPluginโ
Escape Hatch to patch Webpack into 21st century via Plugin
Referencesโ
webpack.config.js
โ Manifest to config Webpack behaviorVite
โ Dev tool to scaffold & build framework UI, next-gen ESBuild Bundler 100X Webpack perf, support native Module, native TSesbuild-loader
โ add this to every CRA project to fix the painful ass speed build times of Webpack!TerserPlugin
โ Escape Hatch to patch Webpack into 21st century via Plugin