This repository was archived by the owner on Dec 20, 2023. It is now read-only.
forked from HubSpot/draft-convert
-
Notifications
You must be signed in to change notification settings - Fork 0
Update dependency webpack to v4 (master) #29
Open
appcues-wss
wants to merge
1
commit into
master
Choose a base branch
from
whitesource-remediate/master-webpack-4.x
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 PR contains the following updates:
^1.13.0->^4.0.0By merging this PR, the below vulnerabilities will be automatically resolved:
Release Notes
webpack/webpack (webpack)
v4.0.0Compare Source
Big changes
modeor--mode) between two modes now: production or developmentoptimization.*(build your custom mode)process.env.NODE_ENVare set to production or development (only in built code, not in config)nonemode 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)CommonsChunkPluginwas removed ->optimization.splitChunks,optimization.runtimeChunktype: "javascript/auto"when transforming JSON via loader to JSBig features
javascript/esmhandles ESM more strictly compared tojavascript/auto:defaultimport, everything else (including namespace import) emit errors.mjsmodules arejavascript/esmby defaultimport()sideEffects: falseis now supported in package.jsonsideEffectsin package.json also supports glob expressions and arrays of glob expressionsoptimization.splitChunksoption was introducedDetails: https://gist.github.com/sokra/1522d586b8e5c0f5072d7565c2bee693
import()occur in a dead branchwebpackIncludeandwebpackExcludeare supported by the magic comment forimport(). They allow to filter files when using a dynamic expression.System.import()now emits a warningRule.parser.system: trueSystem.importwithRule.parser.system: falsemodule.rules[].resolve. It's merged with the global configuration.optimization.minimizehas been added to switch minimizing on/offoptimization.minimizerhas been added to configurate minimizers and optionswebpack-clito use the CLI--progress) now displays plugin namesFeatures
module.rules[].typeoptions.dependenciesconfigurations now throw errorsideEffectscan be overriden via module.rulesoutput.hashFunctioncan now be a Constructor to a custom hash functionoutput.globalObjectconfig option to allow to choose the global object reference in runtime exitCodetypeandrequest.includetestandexcludeto the eval source map devtool pluginfor ofinstead offorEachMapandSetinstead of Objectsincludesinstead ofindexOftext/javascriptandasyncas this are the default values (saves a few bytes)__webpack_require__and argument is omitted.wasm,.mjs,.jsand.jsonextensions in this orderoutput.pathinfois now on by default in develoment modeentrydefaults to./srcoutput.pathdefaults to./distproductiondefaults when omiting themodeoption<{parents}>>{children}<and={siblings}=in StatsbuildAttime to statsimport()now emits a error instead of a warningdoneis now an async hookBugfixes
*/output.chunkCallbackNameto the schema to allow configurating WebWorker templatemodule.id/loadednow correctly bails out of Module Concatentation (Scope Hoisting)Watching.invalidate-!behavior with post loadersrunandwatchRunhooks forMultiCompilerthisis now undefined in ESMvar,constorletjavascript/dynamicorjavascript/moduleis used.buildMetaof nulloriginal-fsmodule for electron targetspluginsInternal changes
plugincalls withtapcalls (new plugin system)buildMeta.exportsType: "default"for json modulesneo-asyncinstead ofasyncRemoved features
module.loadersloaderContext.optionsCompilation.notCacheableflagNoErrorsPluginDependency.isEqualResourceNewWatchingPluginCommonsChunkPluginBreaking changes for plugins/loaders
pluginmethod is backward-compatibleCompiler.hooks.xxx.tap(<plugin name>, fn)nowChunk.chunks/parents/blocksare no longer Arrays. A Set is used internally and there are methods to access it.Parser.scope.renamesandParser.scope.definitionsare no longer Objects/Arrays, but Map/Sets.StackedSetMap(LevelDB-like datastructure) instead of ArraysCompiler.optionsis no longer set while applying pluginsDependency.getReference()may now return aweakproperty.Dependency.weakis now used by theDependencybase class and returned in the base impl ofgetReference()ModulesContextModuleandresolveDependenciesCompiler.resolversintoCompiler.resolverFactoryaccessible with pluginsDependency.isEqualResourcehas been replaced withDependency.getResourceIdentifierTemplateare now staticoutputOptionsandrequestShortenerhas been moved to this classModule.metahas been replaced withModule.buildMetaModule.buildInfoandModule.factoryMetahave been addedModulehave been moved into the new objectsloaderContext.rootContextwhich points to thecontextoptions. Loaders may use it to make stuff relative to the application root.this.hotflag to loader context when HMR is enabledbuildMeta.harmonyhas been replaced withbuildMeta.exportsType: "namespacemap/foreachChunks/Modules/Parentsmethods are now deprecated/removedcreateGeneratorandgeneratorhooks for NormalModuleFactory to customize code generationv3.12.0Compare Source
Bugfixes
hot.acceptcreating duplicates when using the DefinePluginv3.11.0Compare Source
Features
new FooexpressionsjsonpScriptTypeto specify script type for lazy loaded script tagsBugfixes
identin schemaidentis not lost when referencing by identprocess.exitCodeinstead ofprocess.exitv3.10.0Compare Source
Features:
publicPathandfileContextto SourceMapDevToolPluginrequire.includeno longer uses all exports (Tree Shaking)v3.9.1Compare Source
Bugfixes:
ignoredandstdinto schema ofwatchOptionsv3.9.0Compare Source
Features
Bugfixes
stats.alloption to schemaselfbeforethisas global objectwindowinstead of this in JSONPnullin SourceMap correctlymultiStep: truev3.8.1Compare Source
Bugfixes:
statsschema for validationv3.8.0Compare Source
Features:
--envdata in stats (@jbottigliero)import()orrequire.ensurenow (@sokra)Bugfixes:
statsand be more strict (@jbottigliero)Performance
v3.7.1Compare Source
Bugfixes
v3.7.0Compare Source
Features
.concat(@loganfsmyth)ContextExclusionPluginto exclude files in a context (@timse)deepChildrenflag toCommonChunkPlugin(@ArcEglos, @ljcrapo)Bugfixes
--watch-pollin CLI (@Aladdin-ADD)crossOriginon script tags for HMR (@STRML)Performance
v3.6.0Compare Source
Bugfixes
v3.5.6Compare Source
Bugfixes
--watch-pollalso accepts a number now (@civalin)orginalError->originalErrorin HMR API (@sokra)Cannot read property '0' of undefinedin harmony modules (@sokra)requireto root of concatenated module correctly and don't generate__webpack_require__(null)(@sokra)asyncas variable name (@sokra)Performance
v3.5.5Compare Source
Bugfixes:
call on undefinederrors (can happen when usingexternalsandCommonChunkPlugin)__esModuleflag on incremental build withModuleConcatenationPlugin__esModuleflag is now only set when needed with theModuleConcatenationPluginv3.5.4Compare Source
Bugfixes
Features:
parallelism)v3.5.3Compare Source
Bugfixes
ModuleConcatenationPluginv3.5.2Compare Source
Bugfixes:
ModuleConcatenationPlugin)v3.5.1Compare Source
Bugfixes:
v3.5.0Compare Source
Features:
stats.excludeAssetsto allow to filter assets in list (@ldrick)import(/* webpackMode: "weak" */ "module")to try to load a module without network request (@faceyspacey)require.contextwhich is the context mode. Can befalse,"eager","lazy-once","weak"and"async-weak". (@faceyspacey)require.resolveWeaknow support expressions (@faceyspacey)ModuleConcatenationPlugin)Bugfixes:
ModuleConcatenationPluginConcatenatedModule--helpoutput is flushed before process exit (@esbenp)statsoptions are now validated by schema (@esbenp)CommonsChunkPluginin async mode withoutnameargument--resolve-extensions(@tomek-d)has no internal namewhen using dependency variable in root of scope-hoisted modules (ModuleConcatenationPlugin)Examples:
v3.4.1Compare Source
Bugfixes:
v3.4.0Compare Source
Features:
--config-nameoption to choose a config by name for compiling a part of the configBugfixes:
--module-bind-preand--module-bind-postPerformance:
v3.3.0Compare Source
Features:
Bugfixes:
this.compiler.compiler is not a functionv3.2.0Compare Source
Bugfixes:
strictThisContextOnImportsin ConcatenatedModules.strictThisContextOnImports..call()renames of this.typeofwithrequire.resolve(Weak).v3.1.0Compare Source
Features:
thisin a IIFEcacheWithContext: falseby default when it's safesortModulestoChunkwhich is required in extract-text-plugin to support webpack 3Bugfixes:
!with truthy webpack identifier will evaluate correctlyv3.0.0Compare Source
Changes from 2.6.1 to 3.0.0
Features
node_modulesno longer mangle to~in stats [breaking change]webpack.optimize.ModuleConcatenationPlugin)output.libraryExportto select an export for the librarysourceMapFilenamenow supports[contenthash][breaking change]module.noParsesupports functionsnode: falseoption to disable all node specific additionsBugfixes
asyncoptionInternal changes
Changes from 3.0.0-rc.2 to 3.0.0
Bugfixes
Internal changes
v2.7.0Compare Source
Features:
resolve.cacheWithContextto schema[contenthash]insourceMapFilenameas workaround for a caching bugv2.6.1Compare Source
Bugfixes:
output.pathinfo)v2.6.0Compare Source
Features:
webpackModecomment option forimport()output.chunkLoadTimeoutBugfixes:
webpackChunkNameforimport()with expressionv2.5.1Compare Source
Bugfixes:
v2.5.0Compare Source
Bugfixes:
hashSaltto schemasourceMappingURL, which caused issues with some toolsFeatures:
v2.4.1Compare Source
Bugfixes:
v2.4.0Compare Source
Highlighted Features:
import()now allows to configure a chunk namerequire.ensurehas a error callbackFeatures:
warningsFilterto stats options to filter warnings__webpack_chunkname__toExtendedAPIPluginNamedChunksPluginwhich allows to set chunk id, i. e. to chunk namerequire.ensureimport()Bugfixes:
v2.3.3Compare Source
Bugfixes:
v2.3.2Compare Source
Bugfixes:
v2.3.1Compare Source
Bugfixes:
emitWarning/Errorfrom loader with non-Error valuev2.3.0Compare Source
Features:
extensionsoption to DllReferencePluginwarningsFilterto UglifyJsPlugin to hide warnings selectivelyextractCommentsto UglifyJsPlugin to move kept comments into separate file (i. e. LICENSE file)compiler(namein configuration) in rulesextract-text-webpack-pluginorhtml-webpack-pluginmodule.strictExportPresenceto make missing export an error instead of warningwatch-closeevent when the watcher is closedBugfixes:
Systemnow generate valid code i. e.System.globalEnvironmentPluginNotes
The validation now fails when passing absolute paths with lowercase drive letter on windows.
(i. e.
c:\work\stuffinstead ofC:\work\stuff)Lowercase drive letters will cause weird errors (node.js behavior is inconsistent about drive letter casing) in some cases.
So please fix the paths in your shell resp. your tooling and always call webpack with uppercase drive letter. Don't use lowercase drive letters.
v2.2.1Compare Source
Bugfixes:
identis no longer required, but it will choose one automaticallyFeatures:
v2.2.0Compare Source
The first webpack 2 release
No changes here. It's equal to the last RC, but with an updated version number.
Here is a migration guide if you want to migrate from webpack 1 to webpack 2.
Here is a blog post about the release.
Here is the documentation for webpack 2. It's new!
v1.15.0Compare Source
Note: webpack 1 do no longer receive bugfixes/features. Please upgrade to webpack 2.
Bugfixes:
Features: