
Security News
Re-Enabled GitHub Actions Expose Thousands of Repositories to Mini Shai-Hulud
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.
esbuild-import-loader
Advanced tools
npm i esbuild-import-loader
yarn add esbuild-import-loader
{
// 同时认识ts jsx js tsx 文件
test: /\.(t|j)sx?$/,
exclude: /node_modules/,
use: [
{
loader: 'esbuild-import-loader',
options: {
loader: 'tsx',
target: 'esnext',
},
},
],
},
支持所有可选项来自于esbuild , 不过最主要解决的问题还是使用 esbuild 去编译 tsx 或者 jsx, 同时支持按需加载 ,方便 tree-shaking
| 参数 |
|---|
| libraryName 仓库名 如 antd |
| customName 自定义转换格式 |
| customStyle 自定义 css 生成样式 |
{
// 同时认识ts jsx js tsx 文件
test: /\.(t|j)sx?$/,
exclude: /node_modules/,
use: [
{
loader: 'esbuild-import-loader',
options: {
loader: 'tsx',
target: 'esnext',
libraryName: 'antd',
customName: (name) => {
return `antd/lib/${name}`
},
customStyle: (name) => {
return `antd/lib/${name}/style/index.css`
},
},
},
],
},
会生成 如下:
import { Button } from 'antd';
// 👇🏻 👇🏻 👇🏻 👇🏻 👇🏻 👇🏻 👇🏻 👇🏻 👇🏻 👇🏻 //
import 'antd/lib/button/style/css';
import Button from 'antd/lib/button';
FAQs
esbuild 编译tsx, 支持按需加载
We found that esbuild-import-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.

Research
/Security News
The compromise affects MemTensor's MemOS, an open source memory framework for large language models (LLMs) and AI agents. Both npm package @memtensor/memos-cloud-openclaw-plugin and the PyPI package MemoryOS are compromised. They drop cross-platform Go binaries that exfiltrate developer secrets.