1.0.0 • Published 5 years ago
git-lfs-loader v1.0.0
git-lfs-loader
A Webpack loader to prevent accidentally importing Git LFS pointer files.
Installation
npm install --save-dev git-lfs-loaderUsage
// webpack.config.js
module.exports = {
// ...
module: {
rules: [
{
test: /\.(png|jpe?g)$/,
use: [
{
loader: "file-loader",
},
{
loader: "git-lfs-loader",
options: {
errorEncountered: "error",
pointerFileFound: "warning",
},
},
],
},
],
},
}Options
errorEncountered
You can control what happens if an error is encountered (e.g. if Git LFS is not installed) by setting this option to either "error" or "warning".
pointerFileFound
You can control what happens if a Git LFS pointer file is found by setting this option to either "error" or "warning".
Contribute
Build and test:
npm ci
npm run makeembedme is used for code examples in the readme.
1.0.0
5 years ago