Skip to content

Releases: jouni-kantola/templated-assets-webpack-plugin

v4.0.0

30 Aug 07:58
Compare
Choose a tag to compare

Rspack compatibility

To support Rspack without installing webpack too, dependencies to webpack internals are now more loosely coupled.

Breaking changes

Only webpack v5+ is supported now. For webpack v2-4 use templated-assets-webpack-plugin@v3.

Full Changelog: v3.0.2...v4.0.0

Update dependencies

08 Nov 09:03
Compare
Choose a tag to compare

Dependencies updated: v3.0.1...v3.0.2

  • Followed Dependabot's suggestions
  • Removed redundant dependencies from package.json

Update dependencies

09 Dec 10:46
Compare
Choose a tag to compare
  • Updated webpack-sources
  • Dev dependencies updated (with aim to keep compatibility with Node v10.13)
  • Updated according to dependabot's auto-updateable suggestions

Improved handling of paths to webpack's assets

06 Nov 13:05
Compare
Choose a tag to compare

Sometimes, releasing comes down to the question: Does this fix require a patch or major release version bump? We chose the route of releasing a new major version, as the fix change default behavior.

Breaking change

If webpack's publicPath property isn't configured, assets are now referenced without any fixed path. This amends the incorrect behavior of generating paths from root (/), which basically required configuring webpack's publicPath.

Generated path examples

v2.0.0: No publicPath set: src="/app.2040305dd5041a6ac9e8.min.js" (buggy behavior)
v3.0.0: No publicPath set: src="app.2040305dd5041a6ac9e8.min.js" (fixed)

v2.0.0: publicPath set to dist: src="dist/app.2040305dd5041a6ac9e8.min.js"
v3.0.0: publicPath set to dist: src="dist/app.2040305dd5041a6ac9e8.min.js"

Bug fixes

  • webpack@5 sets publicPath to auto if not explicitly set. auto is now stripped from path in a templated asset.
  • If separate output location configured for templated assets, now fixed so [contenthash] can be used with webpack@5.
  • webpack@2 included as supported peer dependency.
  • Configuration changed for unit tests, which enables test runs in Windows.

v3.0.0-beta.1

05 Nov 21:50
Compare
Choose a tag to compare
v3.0.0-beta.1 Pre-release
Pre-release

Fixed #128

v3.0.0-beta.0

04 Nov 23:11
Compare
Choose a tag to compare
v3.0.0-beta.0 Pre-release
Pre-release
v3 beta

webpack 5 support

17 Sep 04:22
Compare
Choose a tag to compare

webpack 5 support

webpack 5 support added. Backwards compatible to previous versions of webpack.

No changes in plugin's supported configuration.

Breaking changes

Node.js v10.13.0 is a minimum now. This follows webpack's Node.js requirement for webpack 5.

Default rules

11 Sep 12:39
Compare
Choose a tag to compare

Default to creating templated assets for all JavaScript and CSS files, when no rules are specified.

So now, to get started using templated-assets-webpack-plugin, this is OK:

const TemplatedAssetsWebpackPlugin = require("templated-assets-webpack-plugin");

...

plugins: [new TemplatedAssetsWebpackPlugin()]

Asset type module/nomodule

17 May 01:30
Compare
Choose a tag to compare

Built-in templates included for referencing assets as module or nomodule. Specified in rules' output.

Tap into emit hook

27 Nov 23:48
Compare
Choose a tag to compare

When plugin is used with a webpack version that supports the hooks API, the plugin now taps to the emit hook. Fallback stays as previous version of templated-assets-webpack-plugin, to act on webpack's emit event.