This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
Update dependency webpack to ^4.0.0 - autoclosed #718
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This Pull Request updates dependency webpack from
^3.10.0
to^4.0.0
Release Notes
v4.0.0
Big changes
mode
or--mode
) between two modes now: production or developmentoptimization.*
(build your custom mode)process.env.NODE_ENV
are set to production or development (only in built code, not in config)none
mode which disables everythingimport()
always returns a namespace object. CommonJS modules are wrapped into the default exportimport()
NoEmitOnErrorsPlugin
->optimization.noEmitOnErrors
(on by default in production mode)ModuleConcatenationPlugin
->optimization.concatenateModules
(on by default in production mode)NamedModulesPlugin
->optimization.namedModules
(on by default in develoment mode)CommonsChunkPlugin
was removed ->optimization.splitChunks
,optimization.runtimeChunk
type: "javascript/auto"
when transforming JSON via loader to JSBig features
javascript/esm
handles ESM more strictly compared tojavascript/auto
:default
import, everything else (including namespace import) emit errors.mjs
modules arejavascript/esm
by defaultimport()
sideEffects: false
is now supported in package.jsonsideEffects
in package.json also supports glob expressions and arrays of glob expressionsoptimization.splitChunks
option was introducedDetails: https://gist.github.com/sokra/1522d586b8e5c0f5072d7565c2bee693
import()
occur in a dead branchwebpackInclude
andwebpackExclude
are supported by the magic comment forimport()
. They allow to filter files when using a dynamic expression.System.import()
now emits a warningRule.parser.system: true
System.import
withRule.parser.system: false
module.rules[].resolve
. It's merged with the global configuration.optimization.minimize
has been added to switch minimizing on/offoptimization.minimizer
has been added to configurate minimizers and optionswebpack-cli
to use the CLI--progress
) now displays plugin namesFeatures
module.rules[].type
options.dependencies
configurations now throw errorsideEffects
can be overriden via module.rulesoutput.hashFunction
can now be a Constructor to a custom hash functionoutput.globalObject
config option to allow to choose the global object reference in runtime exitCodetype
andrequest
.include
test
andexclude
to the eval source map devtool pluginfor of
instead offorEach
Map
andSet
instead of Objectsincludes
instead ofindexOf
text/javascript
andasync
as this are the default values (saves a few bytes)__webpack_require__
and argument is omitted.wasm
,.mjs
,.js
and.json
extensions in this orderoutput.pathinfo
is now on by default in develoment modeentry
defaults to./src
output.path
defaults to./dist
production
defaults when omiting themode
option<{parents}>
>{children}<
and={siblings}=
in StatsbuildAt
time to statsimport()
now emits a error instead of a warningdone
is now an async hookBugfixes
*/
output.chunkCallbackName
to the schema to allow configurating WebWorker templatemodule.id/loaded
now correctly bails out of Module Concatentation (Scope Hoisting)Watching.invalidate
-!
behavior with post loadersrun
andwatchRun
hooks forMultiCompiler
this
is now undefined in ESMvar
,const
orlet
javascript/dynamic
orjavascript/module
is used.buildMeta
of nulloriginal-fs
module for electron targetsplugins
Internal changes
plugin
calls withtap
calls (new plugin system)buildMeta.exportsType: "default"
for json modulesneo-async
instead ofasync
Removed features
module.loaders
loaderContext.options
Compilation.notCacheable
flagNoErrorsPlugin
Dependency.isEqualResource
NewWatchingPlugin
CommonsChunkPlugin
Breaking changes for plugins/loaders
plugin
method is backward-compatibleCompiler.hooks.xxx.tap(<plugin name>, fn)
nowChunk.chunks/parents/blocks
are no longer Arrays. A Set is used internally and there are methods to access it.Parser.scope.renames
andParser.scope.definitions
are no longer Objects/Arrays, but Map/Sets.StackedSetMap
(LevelDB-like datastructure) instead of ArraysCompiler.options
is no longer set while applying pluginsDependency.getReference()
may now return aweak
property.Dependency.weak
is now used by theDependency
base class and returned in the base impl ofgetReference()
Module
sContextModule
andresolveDependencies
Compiler.resolvers
intoCompiler.resolverFactory
accessible with pluginsDependency.isEqualResource
has been replaced withDependency.getResourceIdentifier
Template
are now staticoutputOptions
andrequestShortener
has been moved to this classModule.meta
has been replaced withModule.buildMeta
Module.buildInfo
andModule.factoryMeta
have been addedModule
have been moved into the new objectsloaderContext.rootContext
which points to thecontext
options. Loaders may use it to make stuff relative to the application root.this.hot
flag to loader context when HMR is enabledbuildMeta.harmony
has been replaced withbuildMeta.exportsType: "namespace
map/foreach
Chunks/Modules/Parents
methods are now deprecated/removedcreateGenerator
andgenerator
hooks for NormalModuleFactory to customize code generationv4.0.1
Features
version
property to webpack exportsBugfixes
import()
with CJS now gives correct exportsv4.1.0
Features
filename
option tooptimization.splitChunks
to modify the filename template for splitted chunksBugfixes
this.xxx
inProvidePlugin
v4.1.1
Features
Bugfixes
sourceMap
option of the default UglifyJsPlugin now defaults to true when the SourceMapDevToolPlugin is usedmodule.assets
is now working again in the StatsdevtoolNamespace
default works now also for arrays passed tooutput.library
chunks
option ofoptimization.splitChunks
v4.2.0
Features
splitChunks.automaticNameDelimiter
to configure the name separator for automatic namesstats.excludeModules
now also accept booleansperformance
is disabled by default in non-web targetsBugfixes
events.json
in ProfilingPluginCommits
v4.1.1
6970103
Merge pull request #6627 from Hoten/feat-uglifyjs-default-sourcemap23208a3
Show plural if assets are more than one01a5224
Merge pull request #6664 from webpack/ci/test-timeout1b37115
Make AMD parser modules extensible2428b14
Fix linter errorae2ae4e
Merge pull request #6640 from clarkdo/module-assetsc86cc80
Remove erronious this.parser assignments in apply methods57c6c43
Add requested changes from PR comments1181c0e
Remove accidental filename setting which wasn't needed and was breaking test883088e
fix(ProfilingPlugin): complete after the writeStream had finished flushing the data to the filesystemf9e7a17
Escape module names9eb4daa
Remove CCP link71eff5d
Merge pull request #6686 from webpack/bugfix/ccp-readme6879ab7
Merge pull request #6685 from webpack/bugfix/node_chunks4f39932
Merge pull request #6641 from tmilloff/masterc54df36
Merge pull request #6609 from marcalexiei/configuration-version-error800e7f9
fix #6688edbb6f6
Merge pull request #6670 from SimenB/patch-18a59ef7
Merge pull request #6689 from webpack/bugfix/issue-668807c1f6d
Prevent webpack from running twice at a time81a1cd8
Lint the tests60a5edc
Wrap callback in compiler's run method44e02f4
Wrap callback in watcher's close methode225d10
Fix compiler tests9f60f50
Prevent multi compiler from running twice at a time4d68350
fix bug where modules are put into the wrong chunk37f7681
Merge pull request #6697 from webpack/bugfix/split-chunks41bb63a
4.1.1v4.2.0
cdeffb3
fix(ProfilingPlugin): only expose the end method of fsStreambd043f8
fix lint36db321
Added chunkFilenameDelimiter option for SplitChunksPluginb803c64
Added chunkFilenameDelimiter option for SplitChunksPlugin: Fixed parameterddb78d7
Added chunkFilenameDelimiter option for SplitChunksPlugin: Fixed Typo085d288
Added chunkFilenameDelimiter option for SplitChunksPlugin: Added tests and fixed code style7a19190
bot: Encapsulate output logs in details tag37b4ecf
Only declare mocha globals inside dirfbeb415
Prettify66ff412
Merge pull request #6723 from alberto/eslint-envbda8d52
Added chunkFilenameDelimiter option for SplitChunksPlugin: Applied requested changes771bf85
Added chunkFilenameDelimiter option for SplitChunksPlugin: Fixed test issue3ac042a
bot: Add Summary and remaining errors to output7c0c1a0
Options: default performance to false if not the web/webworker target(#6715)07571fe
add tests6ddba9b
Merge pull request #6712 from ManuelBauer/master81e47b6
Fix typosfcf634c
reverting the HMR plugin runtime to use ES5eff1f8f
sticking to prettier's standards83df7cb
bot: Fix Regex orderea6e173
Move concurrent compilation error to separate classccc32d3
Remove unnecessary handler wrapper9f92969
Fix a test case which was broken due to typo fix2ecd323
Adjusting the default of performance; improve tests to cover different mode and target.19ebed9
Merge pull request #6678 from niieani/profiling-race441b04b
.editorconfig file simplified03e2673
Merge pull request #6713 from montogeek/patch-113b80be
fix: make excludeModules accept booleans0f65643
fix: wrap bool with function to pass tests0732314
fix duplicate property names3dabc43
Merge pull request #6738 from rhysd/fix-typos977bdb9
Merge pull request #6750 from byzyk/fix/672612b3751
Merge pull request #6691 from acupofspirt/masterc65fb74
Merge pull request #6736 from mc-zone/improvment/performance-falsy-at-non-web-targeta515918
wip: check if ! is present in patha99b527
bot: Fix markdown format2194acf
Merge pull request #6756 from montogeek/fix/bot-logs-output-format4bbe7f8
Merge pull request #6739 from deanshub/hmr-es5166a6b9
Merge pull request #6744 from nurassyl/masterf513065
fix: throw validation error when exclamation mark was found in path57ea856
misc: Add schemas to ESLint and Prettier commandsfc7f344
Merge pull request #6766 from montogeek/misc/add-schemas-eslint-prettierfad52bf
Ensure runtime code is written in ES590552da
Merge pull request #6775 from webpack/lint_runtime2b40491
Code review changesda3d412
Remove jsbeautifyrc fileb8b11bf
Merge branch 'master' into fix/6742b61540e
fix prettier75c7804
Merge pull request #6783 from alberto/remove-jsbeautifyrc4428efe
Merge pull request #6674 from chuckdumont/workae18a5a
fix: default chunks to context when no context passedf99f96d
rename variable, use includes instead of indexOf422236f
fix(bug) #5964 convert MS into S for scripts timeout attra534dfd
add testc4678e3
fix(bug) #5964 convert MS into S for scripts timeout attr: update expected bytes valuesf82beb3
Merge pull request #6789 from EugeneHlushko/issue/5964d061aba
fix ProfilingPlugincda226a
handle reexporting json default export correctlyc6b9b9e
Merge pull request #6806 from webpack/bugfix/json-reexport3024078
Merge pull request #6788 from byzyk/fix/6779d628f90
Add end of statement semicolon0d3063e
Merge pull request #6810 from howdy39/add-end-of-statement-semicolon04d8188
Merge pull request #6754 from byzyk/fix/6742d668a23
4.2.0This PR has been generated by Renovate Bot.