Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
amd-deploy
Advanced tools
{
// baseUrl 指向的本地硬盘路径
baseUrl: '',
// amd paths
paths: { },
// amd packages
packages: [ ]
}
{
// 资源 ID 替换,如 require('underscore')
// resource.id 表示代码中写的字面量,即 underscore
// absolute 表示硬盘中的文件路径,如 project/dep/underscore/1.0.0/src/underscore.js
replaceRequireResource: function (resource, absolute) {
return resource.id + Date.now();
},
// 替换 require.config 中的一些值,比如 src 转为 asset
replaceRequireConfig: function (config) {
if (config.baseUrl) {
config.baseUrl = config.baseUrl.replace('url', 'asset');
}
return config;
}
}
{
combine: {
// 全局 include 配置,应用于所有模块
// include 表示即使模块不依赖某些模块,也会合并进去,避免需要时发请求
include: [
'underscore'
],
// 全局 exclude 配置,应用于所有模块
// exclude 表示即使模块依赖某些模块,也不会合并进去,第三方库和业务 common 层通常会用到
exclude: [
'cobble',
'cobble/**/*'
],
// 模块默认按自己的依赖进行合并(不合并 build 个毛...)
// 只有配置成 false 才表示不需要合并(给你不合并的权利)
// 模块默认继承全局 include 和 exclude
// 只有按如下配置才表示不需要继承
// {
// moduleId: {
// inheritInclude: false,
// inheritExclude: false
// }
// }
// 每个模块可以单独配置自己的 include 和 exclude,且优先级比全局 include exclude 更高,即
// 如果 combine.include 包含了一些模块,module.exclude 可以去掉
// 如果 combine.exclude 排除了一些模块,module.include 可以加上
// exclude 和 moduleId 支持模糊匹配(为了避免误杀,只当 * 存在时开启),规则请参考 glob
modules: {
moduleId: {
include: [ ],
exclude: [ ]
}
}
}
}
如果需要合并样式或模板,可自己写规则,如下
{
fileReader: {
styl: function (filePath) {
return 'define("id", [], function () {'
+ 'return style;'
+ '})';
}
}
}
语法树生成代码,默认会被格式化,如果输入的代码已经过 uglify 处理,可用 minify 参数保持压缩状态
{
minify: true
}
FAQs
amd deploy
The npm package amd-deploy receives a total of 5 weekly downloads. As such, amd-deploy popularity was classified as not popular.
We found that amd-deploy 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.
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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.