![Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack](https://cdn.sanity.io/images/cgdhsj6q/production/6af25114feaaac7179b18127c83327568ff592d1-1024x1024.webp?w=800&fit=max&auto=format)
Security News
Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
esbuild-plugin-browserslist
Advanced tools
Changelog
Readme
Configure esbuild's target based on a browserslist query
yarn add esbuild-plugin-browserslist esbuild browserslist
import esbuild from "esbuild";
import browserslist from "browserslist";
import {
esbuildPluginBrowserslist,
resolveToEsbuildTarget,
} from "esbuild-plugin-browserslist";
await esbuild.build({
entryPoints: ["./foo/bar.ts"],
// ... other options (except `target`) ...
plugins: [
esbuildPluginBrowserslist(browserslist("defaults"), {
printUnknownTargets: false,
}),
],
});
// Or:
const target = resolveToEsbuildTarget(browserslist("defaults"), {
printUnknownTargets: false,
});
await esbuild.build({
entryPoints: ["./foo/bar.ts"],
target,
});
Adjust the imports as follows:
const esbuild = require("esbuild");
const browserslist = require("browserslist");
const {
esbuildPluginBrowserslist,
resolveToEsbuildTarget,
} = require("esbuild-plugin-browserslist");
edge
, firefox
, chrome
, safari
, ios_saf
, and node
have direct equivalents for esbuild targets.android
and and_chr
are mapped to the chrome
target, and and_ff
is mapped to the firefox
target.and_qq
, samsung
, opera
, op_mini
, op_mob
, ie
, ie_mob
, bb
, baidu
, and kaios
)You can turn on debug logs (which will print all resolutions or failures) using DEBUG=esbuild-plugin-browserslist
FAQs
Configure esbuild's target based on a browserslist query
The npm package esbuild-plugin-browserslist receives a total of 41,975 weekly downloads. As such, esbuild-plugin-browserslist popularity was classified as popular.
We found that esbuild-plugin-browserslist demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.