Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
add-asset-webpack-plugin
Advanced tools
Dynamically add an asset to the Webpack graph
npm install add-asset-webpack-plugin
import AddAssetPlugin from 'add-asset-webpack-plugin';
export default {
// …
plugins: [
new AddAssetPlugin('file.js', `
console.log('This is a dynamically created file');
`)
]
};
Type: string
Relative file path for the asset.
Type: string | (compilation => string | Promise<string>)
Asset source or a function that returns the asset source.
If a function, it will receive the compilation
instance. And if the function returns a promise, it will be awaited.
NODE_ENV
handlingmodule.exports
for Babel and TypeScript compiled codeFAQs
Dynamically add an asset to the Webpack graph
The npm package add-asset-webpack-plugin receives a total of 1,581 weekly downloads. As such, add-asset-webpack-plugin popularity was classified as popular.
We found that add-asset-webpack-plugin 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.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.