
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
dn-middleware-webpack5
Advanced tools
dev:
- name: webpack5
watch: true
- name: server
- name: browser-sync
build:
- name: webpack5
env: "production"
npm uninstall dn-middleware-webpack -D && npm i dn-middleware-webpack5 -D
env
类型:"development" | "production"
默认值:"development"
运行环境,开发环境development,生产环境production
entry
类型:string | object
默认值:"src/index"
示例:
entry: src/test.tsx
entry:
(1): src/**.tsx
entry:
x: src/index.tsx
y: src/test.tsx
入口起点
output
类型:string | object
默认值:"/build"
输出文件的相对路径
output.path
同 output
output.library
类型:object
默认值:{}
参考:library
output.chunkFileName
同 output
默认值:"[name].[chunkhash:8].chunk.js"
默认异步chunk为这个路径,可根据vm中升级前的路径灵活变更
template
类型:string | Array<{ name: string; file: string }>
默认值:"public/index.html"
或 "src/assets/index.html"
html模板入口
publicPath
类型:string
默认值:/
异步资源默认前缀,如cdn地址
devtool
| sourceMap(v4)
类型:boolean | string
默认值:false
控制是否生成,以及如何生成 source map
target
类型:"browser"| "node" | "webworker"
默认值:"browser"
编译环境
alias
类型:object
默认值:{}
别名
jsxRuntime
类型:"automatic" | "classic"
透传给 dn-middleware-babel
的 jsxRuntime
配置项,详细说明请查看相关文档
injectCSS
类型:boolean
默认值:true
是否引入css
cssModules
类型:boolean
默认值:false
是否使用 css Modules
disabledTypeCheck
类型:boolean
默认值:false
是否阻止 ts 类型检查
tscCompileOnError
类型:boolean
默认值:true
ts类型检查中的错误是否会阻断编译
folders
类型:
{
js?: string;
css?: string;
media?: string;
html?: string;
}
默认值:{}
指定资源子目录名称,主要包括css,js,字体和图片和html的目录,不指定的话会直接输出到output目录下
moduleFederation
类型:object
模块联邦相关配置
js
compress
类型:boolean
默认值:开发环境默认 false
,生产环境默认 true
是否启用压缩(如果使用了compress中间件,需要将此配置设置为 false)
terser.terserOptions
类型: object
默认值: {}
esbuild.minify
类型:boolean | object
默认值:false
是否启用 esbuild
的构建产物压缩能力,代替 TerserPlugin
,类型为 object 时透传给 ESBuildMinifyPlugin 作为选项
esbuild.loader
类型:boolean | object
默认值:false
【暂不支持】是否启用 esbuild
的构建能力,代替 babel-loader
,类型为 object 时作为 esbuild-loader 的选项
watch
类型:boolean
默认值:开发环境默认 true
,生产环境默认 false
是否开启监听模式
externals
类型:object
默认值:{}
打包排除的依赖配置项
external(v4)
类型:boolean
默认值:false
是否要打包排除依赖
hot
类型:boolean
默认值:开发环境默认为 true
是否开启 react-refresh(类似于 HMR)
common.disabled(v4)
类型:boolean
默认值:false
禁用抽取公共部分
common.name(v4)
类型:string
默认值:common
生成的公共资源名称
htmlMinifier
类型:boolean
默认值:true
是否压缩html
performance
类型:boolean |"warning" | "error"
默认值:false
是否开启性能提示及形式
optimization
类型:
{
minimize?: Boolean;
minimizer?: any;
splitChunks?: object;
innerGraph?: boolean;
}
默认值:false
优化配置项
cache
类型:object
默认值:{ type: "filesystem" }
缓存相关的配置项,参考:官方文档了解相关配置项
analysis
类型:boolean | object
默认值:false
是否启用分析工具BundleAnalyzerPlugin
,以及相关配置项,如是否为其开启server
statsOpts
类型:object
定制 stats 输出项内容
FAQs
--- group: middleware name: webpack5 title: Webpack5 ---
We found that dn-middleware-webpack5 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.