Skip to content

Releases: privatenumber/esbuild-loader

v3.0.1

14 Feb 02:05
Compare
Choose a tag to compare

3.0.1 (2023-02-14)

Performance Improvements

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

v3.0.0

08 Feb 04:03
Compare
Choose a tag to compare

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

13 Jan 04:24
Compare
Choose a tag to compare

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

v2.20.0

04 Sep 00:13
Compare
Choose a tag to compare

2.20.0 (2022-09-04)

Features

v2.19.0

15 May 17:05
Compare
Choose a tag to compare

2.19.0 (2022-05-15)

Features

v2.18.0

21 Dec 08:28
Compare
Choose a tag to compare

2.18.0 (2021-12-21)

Features

  • upgrade esbuild to 0.14.6 (be292fa)

v2.17.1

21 Dec 08:21
Compare
Choose a tag to compare

2.17.1 (2021-12-21)

Bug Fixes

v2.17.0

12 Dec 07:07
7cd111e
Compare
Choose a tag to compare

2.17.0 (2021-12-12)

Features

  • upgrade esbuild to 0.14.2 (153f964)

v2.16.0

08 Oct 19:49
3c020ee
Compare
Choose a tag to compare

2.16.0 (2021-10-08)

Features

v2.15.1

19 Aug 15:25
db0971c
Compare
Choose a tag to compare

2.15.1 (2021-08-19)

Bug Fixes

  • minify: invalid esbuild options with custom implementation (#197) (21a5dd1)