-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Closed
Labels
webpack5Docs for webpack 5Docs for webpack 5
Milestone
Description
A pull request by @sokra was merged and maintainers requested a documentation change.
See pull request: webpack/webpack#9784
This PR allows to run webpack without runtime in some cases.
- remove items from runtime when unneeded
- add requireScope RuntimeGlobal
- Deprecate MainTemplate, ChunkTemplate, ModuleTemplate
- move some hooks to CompatRuntimeModule
- move logic and hooks to JavascriptModulesPlugin
- terser defaults inherit ecma version
- refactor Module.source() and Module.getRuntimeRequirements() into
Module.codeGeneration() - add code generation phase to Compilation
- add
output.iifeoptions to remove iife wrapper - add
experiments.outputModulewhich enablesoutput.module - add
output.modulewhich sets defaults tooutput.iife: false,output.libraryTarget: "module",output.jsonpScriptType: "module",terserOptions.module: true - add
output.libraryTarget: "module"(not yet implemented) - add
output.moduleexample - improve runtime requirements needed by ConcatenatedModule
- add entry inlining, which inlines entry module code into runtime scope (only when safe)
- make whole bundle strict when all modules are strict
- remove "use strict" from runtime things for bundle size reasons
What kind of change does this PR introduce?
refactoring, feature
Did you add tests for your changes?
yes
Does this PR introduce a breaking change?
maybe, but compat-layer added
What needs to be documented once your changes are merged?
- add
output.iifeoptions to remove iife wrapper - add
experiments.outputModulewhich enabledoutput.moduleandoutput.libraryTarget: "module"(and also enabled them by default) - add
output.modulewhich sets defaults tooutput.iife: false,output.libraryTarget: "module",output.jsonpScriptType: "module",terserOptions.module: true - add
output.libraryTarget: "module"(not yet implemented)
Metadata
Metadata
Assignees
Labels
webpack5Docs for webpack 5Docs for webpack 5