Esbuild Loader Versions Save

Webpack loader for esbuild: Speed up your build ⚡️

v4.1.0

2 months ago

4.1.0 (2024-03-08)

Features

v4.0.3

3 months ago

4.0.3 (2024-01-23)

Bug Fixes

Reverts

v4.0.2

8 months ago

4.0.2 (2023-08-29)

Bug Fixes

  • plugin: mark assets as minimized only when minified (#338) (a5fddd0)

v4.0.1

8 months ago

4.0.1 (2023-08-19)

Bug Fixes

  • prevent webpack-merge from cloning (7d6e482)

Performance Improvements

  • upgrade get-tsconfig with caching (544f4bd)

v4.0.0

9 months ago

4.0.0 (2023-08-09)

Bug Fixes

  • plugin: only minimize when used as minimizer (#333) (507c947)
  • tsconfig: support multiple tsconfigs to be specified (#327) (9dbbae6)

BREAKING CHANGES

  • tsconfig: tsconfig passed in by path is now applied regardless of whether it matches
  • plugin: No longer minifies when used in "plugin". Use in "minimizer" to enable minification by default.

v3.2.0

9 months ago

3.2.0 (2023-08-09)

Features

v3.1.0

9 months ago

3.1.0 (2023-08-01)

Features

v3.0.1

1 year ago

3.0.1 (2023-02-14)

Performance Improvements

  • only call sourceAndMap() when source maps are enabled (#316) (5c97454)

v3.0.0

1 year ago

3.0.0 (2023-02-08)

Migration guide

  • ESBuildMinifyPlugin was renamed to EsbuildPlugin to indicate it can be used as a general interface to esbuild (not just a minifier, but transformer). Import EsbuildPlugin instead:
- const { ESBuildMinifyPlugin } = require('esbuild-loader')
+ const { EsbuildPlugin } = require('esbuild-loader')
  • For .js, .jsx, .ts, .tsx, .css files, you no longer need to set the loader option because esbuild-loader can now detect how to handle them based on the extension. This also means you can consolidate esbuild-loader rules for different file types into one, rather than hard-coding how to load each extension type.
 module: {
   rules: [
     {
       test: /\.[tj]sx?$/,
       loader: 'esbuild-loader',
       options: {
         target: 'es2015',
-        loader: 'tsx',
       },
     },
   ],
 },

👉 Note: For this to work, make sure to follow file extension conventions such as using .jsx/.tsx for files that contain JSX.

  • You can now use the tsconfig property to pass in a tsconfig file, and it will even resolve extends

  • tsconfig.json includes/excludes/files are now respected so it will only apply the tsconfig.json to matching files. However, TypeScript compilation will always work regardless of tsconfig.json.

  • If Webpack's target is web, EsbuildPlugin will default to using format: iife unless otherwise specified. This change was made to prevent window pollution.

  • Make sure your Node.js version is at least v16

Changes

Bug Fixes

  • apply tsconfig only to matching files (#310) (7c68769)

Build System

  • add exports map and bundle with pkgroll (#265) (f907edd)

Code Refactoring

Continuous Integration

Features

BREAKING CHANGES

  • tsconfig.json is now only applied to files it matches (via include/exclude/files)
  • plugin: Plugin default format is now iife when Webpack's target is web & esbuild's target is below esnext
  • ESBuildMinifyPlugin renamed to EsbuildPlugin; MinifyPluginOptions renamed to EsbuildPluginOptions
  • sourcemap option removed
  • Default value of loader now auto-detects which loader to use based on the extension of the file
  • Increase supported Node.js to v16
  • exports map and bundled files

v2.21.0

1 year ago

2.21.0 (2023-01-13)

Bug Fixes

  • support Source without #sourceAndMap() (f5bc714), closes #298
  • use older webpack-sources for WP4 and built-in one for WP5 (#300) (106484b)

Features