Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency esbuild-loader to v3 #1650

Merged
merged 2 commits into from
Mar 9, 2023
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 14, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
esbuild-loader ^2.21.0 -> ^3.0.1 age adoption passing confidence

Release Notes

esbuild-kit/esbuild-loader

v3.0.1

Compare Source

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

v3.0.0

Compare Source

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
Build System
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

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot requested a review from a team February 14, 2023 21:37
@renovate renovate bot force-pushed the renovate/esbuild-loader-3.x branch 8 times, most recently from dd63b7c to 7103005 Compare February 22, 2023 21:30
@renovate renovate bot changed the title Update dependency esbuild-loader to v3 chore(deps): update dependency esbuild-loader to v3 Feb 22, 2023
@renovate renovate bot force-pushed the renovate/esbuild-loader-3.x branch 4 times, most recently from 7d4fa36 to 2dba000 Compare March 8, 2023 09:53
@renovate renovate bot changed the title chore(deps): update dependency esbuild-loader to v3 Update dependency esbuild-loader to v3 Mar 8, 2023
@renovate renovate bot force-pushed the renovate/esbuild-loader-3.x branch 2 times, most recently from 7c9aee4 to 58e6c1f Compare March 8, 2023 11:34
@renovate renovate bot force-pushed the renovate/esbuild-loader-3.x branch from 58e6c1f to 292c69b Compare March 8, 2023 12:04
@renovate
Copy link
Contributor Author

renovate bot commented Mar 9, 2023

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

Warning: custom changes will be lost.

@dcroote dcroote force-pushed the renovate/esbuild-loader-3.x branch from 6c17970 to 7935a65 Compare March 9, 2023 06:27
Copy link
Contributor

@dcroote dcroote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I applied a straightforward migration in my commit.

@amarthadan - would you mind a (real quick) review?

Copy link
Contributor

@amarthadan amarthadan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks 🙂

@dcroote dcroote merged commit 829f790 into master Mar 9, 2023
@dcroote dcroote deleted the renovate/esbuild-loader-3.x branch March 9, 2023 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants