
Research
/Security News
Miasma Mini Shai-Hulud Hits ImmobiliareLabs npm Packages
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.
mika-webpack-img2base64-loader
Advanced tools
这是一个将代码中引用本地资源图片(png、jpg、jpeg、gif、webp、svg格式)转换为base64格式的Webpack loader
这是一个将代码中引用本地资源图片(png、jpg、jpeg、gif、webp、svg格式)转换为base64格式的Webpack loader
npm install --save-dev ./webpack-plugins/mika-img2base64-loader
1.在webpack.config.js中配置loader:
module.exports = {
// ... 其他配置
module: {
rules: [
// ... 其他规则
{
test: /\.(png|jpg|jpeg|gif|webp|svg)$/i,
type: 'javascript/auto',
use: {
loader: './webpack-plugins/mika-img2base64-loader',
options: {
limit: 100000, // 100KB
encoding: 'base64',
mimetype: undefined,
fallback: 'file-loader'
}
}
}
]
}
}
import logo from './assets/logo.png'
FAQs
这是一个将代码中引用本地资源图片(png、jpg、jpeg、gif、webp、svg格式)转换为base64格式的Webpack loader
We found that mika-webpack-img2base64-loader 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.

Research
/Security News
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.

Security News
Rolldown paused Rust React Compiler integration after a 5MB binary size increase raised concerns about shipping React-specific code to all Vite users.

Security News
/Research
Mini Shai-Hulud expands into the Go ecosystem after hitting LeoPlatform npm packages and targeting GitHub Actions workflows.