
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
webpack-node-module-plugin
Advanced tools
react-native-web 同构模式下 服务端打包插件
使用webpack打包服务端代码时,可以不进行文件合并,而是保留原始目录结构产出
打包后的文件。
npm install webpack-node-module-plugin --save-dev
Webpack config example:
var NodeModulePlugin =require('webpack-node-module-plugin').NodeModulePlugin;
// 静态资源url前是否添加一个全局变量进行拼接
// 例如:require('./images/a.jpg') --> webpack --> __cdnurl+'/app/assets/sdf23422sssdf.jpg'
var cdnVariableName= '__cdnurl__';
// 发布目录根路径 copyNodeMoudles为false时可以不传递
var targetRoot = 'd:/release/web';
// 是否复制node_modules到发布目录下 默认: false
var copyNodeMoudles = true;
module.exports = {
entry: {
'server': ['./index.web.js']
},
output: {
path: ...,
filename: 'server/[name].js',
publicPath: '/assets/',
libraryTarget: 'commonjs2'
},
plugins:[
....
new NodeModulePlugin('rootDir',cdnVariableName,targetRoot,copyNodeMoudles)
]
}
基于 MIT License 开源,使用代码只需说明来源,或者引用 license.txt 即可。
FAQs
[![NPM version][npm-image]][npm-url]
The npm package webpack-node-module-plugin receives a total of 25 weekly downloads. As such, webpack-node-module-plugin popularity was classified as not popular.
We found that webpack-node-module-plugin 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
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.