Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
@dr.pogodin/babel-plugin-transform-assets
Advanced tools
Transforms importing of asset files at compile time using Babel
This is a fork of babel-plugin-transform-assets
upgraded to be compatible with the latest Webpack's file-loder
, and to use the latest versions of all dependencies. For migration just prefix the plugin name with @dr.pogodin/
scopename in your package.json
and Babel configs.
Transforms importing of asset files at compile time using Babel. This plugin removes the need to run your server code through Webpack module bundler when using loaders such as file-loader, url-loader and building isomorphic universal apps. Aids in creating a cleaner, maintainable build process at the cost of yet another Babel plugin.
import file from '../file.txt';
will be transformed to
var file = 'file.txt?9LDjftP';
See the spec for more examples.
Babel v6 or higher.
npm install -D @dr.pogodin/babel-plugin-transform-assets
.babelrc
.babelrc
{
"plugins": [
["@dr.pogodin/transform-assets", {
"extensions": ["svg"],
"name": "[name].[ext]?[sha512:hash:base64:7]"
}]
]
}
require('babel-core').transform('code', {
plugins: [
['@dr.pogodin/transform-assets', {
extensions: ['svg'],
name: '[name].[ext]?[sha512:hash:base64:7]',
}]
]
});
Contributions are very welcome—bug fixes, features, documentation, tests. Just make sure the tests are passing.
FAQs
Transforms importing of asset files at compile time using Babel
The npm package @dr.pogodin/babel-plugin-transform-assets receives a total of 168 weekly downloads. As such, @dr.pogodin/babel-plugin-transform-assets popularity was classified as not popular.
We found that @dr.pogodin/babel-plugin-transform-assets demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.