Skip to content
Pre-release
Pre-release

@sokra sokra released this Jun 29, 2020

Bugfixes

  • Remove broken postinstall script
Assets 2
Pre-release
Pre-release

@sokra sokra released this Jun 29, 2020 · 2 commits to master since this release

Features

  • Data Uri are now supported
    • application/json, text/javascript, application/javascript, application/node, application/wasm are supported by default as mimetype
    • added Rule.mimetype to match mimetype in rules
  • [Node Chunk Loading] support runtime and entries being in different chunks (e. g. with runtimeChunk single)
  • [splitChunks] defaults for splitChunks.maxAsyncRequests and splitChunks.maxInitialRequests has been increased to 30

Bugfixes

  • [Chunk Loading] fix a race condition with chunk loading with multiple webpack builds on a single page with overlapping chunk ids (since beta.18)
    • data-webpack has now a output.uniqueName + ":" prefix
    • data-webpack is not used when no output.uniqueName is specified
  • [HMR] callback function in module.hot.accept is now parsed
  • [splitChunks.maxSize] chunks are not unnecessary renamed when not splitted at all
  • [splitChunks.maxSize] no longer generates filenames that only differ in casing
  • [Module Federation] providing modules now also works in incremental builds
  • [Normalization] stats: true now normalizes to stats: { preset: "normal" }
  • [Stats] fixed as incorrectly inserted new line in the assets table
  • [Jsonp Chunk Loading] fix a problem with non-js chunk in the entrypoint

Changes

  • rename output.jsonpScriptType to output.scriptType as it's now also used for other things than jsonp (e. g. script externals)

Performance

  • improvements in SplitChunksPlugin

Contributing

  • yarn lockfile is now deduplicated and checked by CI
Assets 2
Pre-release
Pre-release

@sokra sokra released this Jun 17, 2020 · 59 commits to master since this release

Features

  • add script external type, which allows to load a global from a script tag
  • allow entry: {} for no entries
  • allow magic comment in import() for used exports
    • /* webpackExports: "default" */
    • /* webpackExports: ["named", "default"] */
  • add support for the "exports" field in package.json
  • add resolve.restrictions to restrict the paths a request can resolve to
  • ModuleFederationPlugin
    • change defaults to use script as remoteType by default
    • for module requests in shared (like shared: ["package", "package/sub/path"])
      • this will apply only the references to modules that match this shared module
      • requiredVersion will be extracted from package.json of the consumer automatically
        • new packageName option allow to choose the package name for the dependencies lookup (or dev/peer/optionalDependencies)
        • requiredVersion: false allows to disable this
      • This means webpack will look for cases in your source code where your are using something like import "package". The next package.json for the referencing module is used to determine a requiredVersion. The resolved result will be provided as shared module in the version of the package.json at the resulting location.
    • for relative requests in shared (like shared: ["./relative/path"])
      • will resolve relative to context
      • doesn't depend on usage in the build. Always provided.
      • do not use a requiredVersion by default. Only when specified or packageName is specified.
      • This means webpack will resolve the relative request and provide the result as shared module in the version of the next package.json found at the location of the result. All requests resolving to the same file location will consume the shared module without any required version check.
    • module requests with tailing / in shared (like shared: ["package/"])
      • will match all module request with this prefix
      • otherwise behave like normal module requests

Bugfixes

  • Fix a bug in HMR runtime code that causes a crash with Cannot read property 'hot' of undefined.
Assets 2
Pre-release
Pre-release

@sokra sokra released this Jun 3, 2020 · 156 commits to master since this release

Known Problems

  • The transitive move-file dependency requires node >= 10.17, while webpack is intended to be >= 10.13 compatible. This temporary increases the min node version for this beta release until we found a solution to that.
    • Fixed, latest patch releases are >= 10.13 compatible

Features

  • Using module in an ESM no longer needs the whole namespace object
  • SideEffects flag can follow reexports that are partially dynamic or use a compat default
  • export * uses more exports info data for better exports
  • dynamic export * no longer flags the default export as maybe provided
  • allow module concatenation even when provided exports are unknown, but used exports are known
  • add promise external, which is like var but awaits the global value in a async module
  • add import external, which uses import() to load a native ESM
  • add output.importFunctionName to change the import() to something else, e.g. to a polyfill.
  • remove some unneeded dependencies
  • Module Federation
    • removed scope shortcut object config for container plugins (BREAKING)
    • add ability to pass advanced options to container plugins
    • allow to expose an array of modules (similar to entry)
    • allow to provide an array of remote locations (they act as fallback)
    • await when a promise is returned by the external
    • allow to expose an index module which is used when using the remote without subpath
    • change exposed keys to be prefixed with ./ (BREAKING)
    • automatically inferred keys do no longer omit leading non-word chars
    • add version handling to shared modules (see #10960 for details, BREAKING)

Bugfixes

  • export default no longer converts function declarations to expressions
  • inline external type can also provided when using an array external.
  • fixed a bug in snapshotting that caused changes to be ignored during watching
  • add missing dependency for correct typings
  • Persistent Caching
    • DllPlugin related classes are now serializable
    • Dates are serializable

Changes

  • merged all asset processing hooks into a new hook processAssets with stages
  • Modifications to compilation.asset after sealing are deprecated
Assets 2
Pre-release
Pre-release

@sokra sokra released this May 5, 2020 · 310 commits to master since this release

Features

Bugfixes

  • refactor exports info logic for CommonJs exports
    • fixes a bug when using an export named default in CommonJs
  • record chunk id using chunk group name and index in it
    • fixes a bug when using HMR and split-chunked initial chunk
  • also set parents in module graph when using non-recursive module creation
    • fixes crash in harmony dependency when using this.loadModule with imports
  • force upgrade terser-webpack-plugin for memory leak bugfix
  • fix small non-monotony in the ProgressPlugin
  • track runtime modules that need a full hash and calculate it
    • fixes a bug where main.js is not updated on a HMR update
    • This caused that all previous HMR updates are applied on reload

Contributing

  • CI tests node.js 14 instead of 13 now
  • ignore code coverage for timing dependent code

Full Changelog

Feedback

Assets 2
Pre-release
Pre-release

@sokra sokra released this Apr 21, 2020 · 473 commits to master since this release

Breaking Changes

  • generate and expose typescript typings from webpack

Features

  • add API to generate and process CLI arguments targeting webpack configuration
  • add __system_context__ as context from System.js when using System.js as libraryTarget
  • add module.hot.invalidate() API to trigger an additional hot update of this module
  • add bigint support for the DefinePlugin
  • add bigint support for basic evaluations like maths

Bugfixes

  • fix a ReferenceError: xxx is not defined where some pure expression where not be removed from the code
  • fix handling of extends in class when class is unused
  • fix incorrect schema validation for Rule conditions (include, exclude and test are not valid here)
  • fix some spelling issues
  • add space between value and unit in output
  • fix generated code when using the DefinePlugin with -0
  • Exports from System.js externals behave correctly as ESM now

Improvements

  • remove some duplication info in seralization
  • make descriptions in schema more consistent in formating

Internal

  • add spellcheck to CI

Full Changelog

Feedback

Assets 2

@sokra sokra released this Apr 21, 2020 · 2996 commits to master since this release

Features

  • add module.hot.invalidate() to HMR API

Dependencies

  • push versions for forced security updates
Assets 2

@sokra sokra released this Mar 24, 2020 · 2996 commits to master since this release

Bugfixes

  • update webassemblyjs dependencies for instruction update
  • update mkdirp dependency for security reasons
Assets 2
Pre-release
Pre-release

@sokra sokra released this Mar 2, 2020 · 777 commits to master since this release

Changes

  • optimization.sideEffects, optimization.innerGraph and optimization.usedExports are on by default now (only production before)
    • Motivation: less difference between prod and dev builds, getting sideEffects benefits in dev mode.
  • EnvironmentPlugin shows an error now when referenced env variable is missing and has no fallback
    • Motivation: Builds should fail when an expected env variable is missing
  • Remove serve property from schema
    • Motivation: No longer needed, as this has move to a plugin
  • merge all library related options into output.library
    • output.library: { type, name, export, auxiliaryComment, umdNamedDefine }
    • old options are still possible, but no longer recommended
    • Motivation: more clear structure, easier sharing with library in the entry option

Features

  • Allow a entry description object for advanced entrypoint configuration
    • entry: { main: { ... } }
    • import: list of modules
    • filename: custom filename template
      • Using output.chunkFilename is no longer recommended and only output.filename should be used now
    • dependOn: list of other entrypoint which are expected to be available on page
    • library: library exposing
  • add percentBy option to ProgressPlugin to change percent calculation
  • DefinePlugin supports arrays directly now
  • sync wasm support v128 now
  • Update PnP support to pnp version 3 (yarn berry)
  • add output.uniqueName option
    • defaults to the package.json name in the current directory
    • affects globals used for chunk communication e. g. output.jsonpFunction

DX

  • Make Compiler/Compilation.cache property read-only to make it easier to fix compat issues
  • ProgressPlugin stores and restores counts from last build to persistent cache for better progress calculation
  • Add Did you mean to error message for some common configuration mistakes

Bugfixes

  • fix infinite loop when using export * in a circular way
  • CLI has non-zero exit code when stdin is not available to ask for webpack-cli installation
  • hoist exports in concatenated modules
    • fixes bug with circular dependencies with non-concatenated modules
  • generate valid syntax for the injected error code when modules are not found

Refactoring

  • Internal refactoring of the inner graph API
  • The way the default webpack configuration is created has been refactored
    • New process: 1. configuration is normalized, 2. Plugins are applied, 3. configuration defaults are set
    • This allows plugins to apply their own configuration defaults.
    • This allows to write Configuration Preset Plugins.
  • refactor the way library exposing is handled

Performance

  • Increase the time logging of the core when using verbose logging
  • Performance improvements
    • Chunk Graph
    • Persistent Caching
    • SplitChunks
    • Chunk

Full Changelog

Feedback

Assets 2

@sokra sokra released this Mar 2, 2020 · 2996 commits to master since this release

Bugfixes

  • Disable constant replacements in "use asm" scope
  • Update schema to disallow functions for output.hotUpdateChunkFilename as this doesn't work
  • Hoist exports in concatenated module to handle circular references with non-concatenated modules correctly
  • Flag all modules as used in DLLs to fix missing exports
Assets 2
You can’t perform that action at this time.