question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

🐛 [BUG]error - jsMinifier: esbuild is not supported when there is ie in the targets, you can use jsMinifier: 'terser'

See original GitHub issue

🐛 bug 描述

yarn build

📷 复现步骤 | Recurrence steps

$ max build
Hello PRO
Using openapi Plugin
info  - Umi v4.0.11
error - jsMinifier: esbuild is not supported when there is ie in the targets, you can use jsMinifier: 'terser'
fatal - Error: IE is not supported
    at getEsBuildTarget (/Users/mac/work/673/admin_web/node_modules/@umijs/preset-umi/node_modules/@umijs/bundler-webpack/dist/utils/getEsBuildTarget.js:31:11)
    at addCompressPlugin (/Users/mac/work/673/admin_web/node_modules/@umijs/preset-umi/node_modules/@umijs/bundler-webpack/dist/config/compressPlugin.js:55:70)
    at getConfig (/Users/mac/work/673/admin_web/node_modules/@umijs/preset-umi/node_modules/@umijs/bundler-webpack/dist/config/config.js:140:53)
    at async Proxy.build (/Users/mac/work/673/admin_web/node_modules/@umijs/preset-umi/node_modules/@umijs/bundler-webpack/dist/build.js:52:25)
    at async Command.fn (/Users/mac/work/673/admin_web/node_modules/@umijs/preset-umi/dist/commands/build.js:144:17)
    at async Service.run (/Users/mac/work/673/admin_web/node_modules/umi/node_modules/@umijs/core/dist/service/service.js:270:15)
    at async Service.run2 (/Users/mac/work/673/admin_web/node_modules/umi/dist/service/service.js:74:12)
    at async run (/Users/mac/work/673/admin_web/node_modules/umi/dist/cli/cli.js:55:7)
fatal - A complete log of this run can be found in:
fatal - /Users/mac/work/673/admin_web/node_modules/.cache/logger/umi.log
fatal - Consider reporting a GitHub issue on https://github.com/umijs/umi/issues
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

🏞 期望结果 | Expected results

💻 复现代码 | Recurrence code

© 版本信息

  • Ant Design Pro 版本: [e.g. 6.0 beta1]
  • umi 版本 v4.0.11
  • 浏览器环境
  • 开发环境 [e.g. mac OS]

🚑 其他信息

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
sorrycccommented, Aug 10, 2022

因为用了 esbuild 压缩就兼容不了 IE 11,这两个是冲突的。所以要么去掉 targets 里 ie 11 的配置,要么配 jsMinifier: ‘terser’。

1reaction
roseqin368commented, Aug 29, 2022

screenshot-20220829-115010

Read more comments on GitHub >

github_iconTop Results From Across the Web

API - ESBuild
This API call is used by the command-line interface if there is at least one input file provided or the --bundle flag is...
Read more >
Terser rules for Bazel - bazelbuild/rules_nodejs - aspect build
Note that this rule is NOT recursive. It assumes a flat file structure. Passing in a folder with nested folder will result in...
Read more >
esbuild is not supported when there is ie in the targets, you ...
[BUG]error - jsMinifier: esbuild is not supported when there is ie in the targets, you can use jsMinifier: 'terser'
Read more >
Minifying - SurviveJS
Webpack performs minification in production mode using Terser by default. Besides JavaScript, it's possible to minify other assets, such as CSS and HTML...
Read more >
esbuild-rs - crates.io: Rust Package Registry
Rust wrapper for esbuild, an extremely fast JS minifier written in Go.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found