Update package and handling lazyImage for remote image
This commit is contained in:
parent
93d8fe7ca1
commit
a0326cb9d0
3 changed files with 522 additions and 1461 deletions
|
|
@ -7,7 +7,14 @@ module.exports = function (eleventyConfig) {
|
|||
eleventyConfig.addPlugin(syntaxHighlight);
|
||||
|
||||
eleventyConfig.addPlugin(lazyImagesPlugin, {
|
||||
transformImgPath: (imgPath) => `./src/${imgPath}`,
|
||||
transformImgPath: (imgPath) => {
|
||||
if (imgPath.startsWith('http://') || imgPath.startsWith('https://')) {
|
||||
// Handle remote file
|
||||
return imgPath;
|
||||
} else {
|
||||
return `./src/${imgPath}`;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
eleventyConfig.setEjsOptions({
|
||||
|
|
|
|||
1950
package-lock.json
generated
1950
package-lock.json
generated
File diff suppressed because it is too large
Load diff
24
package.json
24
package.json
|
|
@ -22,32 +22,32 @@
|
|||
"devDependencies": {
|
||||
"@11ty/eleventy": "^0.11.0",
|
||||
"@11ty/eleventy-plugin-syntaxhighlight": "^3.0.1",
|
||||
"autoprefixer": "^9.8.0",
|
||||
"copy-webpack-plugin": "^6.0.2",
|
||||
"css-loader": "^3.5.3",
|
||||
"autoprefixer": "^9.8.6",
|
||||
"copy-webpack-plugin": "^6.0.3",
|
||||
"css-loader": "^4.2.1",
|
||||
"cssnano": "^4.1.10",
|
||||
"date-fns": "^2.14.0",
|
||||
"eleventy-plugin-lazyimages": "^1.1.2",
|
||||
"eslint": "^7.2.0",
|
||||
"date-fns": "^2.15.0",
|
||||
"eleventy-plugin-lazyimages": "^2.0.1",
|
||||
"eslint": "^7.6.0",
|
||||
"eslint-config-airbnb-base": "^14.2.0",
|
||||
"eslint-plugin-import": "^2.21.2",
|
||||
"eslint-plugin-import": "^2.22.0",
|
||||
"file-loader": "^6.0.0",
|
||||
"glob": "^7.1.6",
|
||||
"html-minifier": "^4.0.0",
|
||||
"html-webpack-plugin": "^4.3.0",
|
||||
"husky": "^4.2.5",
|
||||
"image-webpack-loader": "^6.0.0",
|
||||
"lint-staged": "^10.2.9",
|
||||
"lint-staged": "^10.2.11",
|
||||
"mini-css-extract-plugin": "^0.9.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"postcss-loader": "^3.0.0",
|
||||
"prettier": "^2.0.5",
|
||||
"rimraf": "^3.0.2",
|
||||
"serve": "^11.3.2",
|
||||
"tailwindcss": "^1.4.6",
|
||||
"webpack": "^4.43.0",
|
||||
"webpack-cli": "^3.3.11",
|
||||
"webpack-fix-style-only-entries": "^0.5.0"
|
||||
"tailwindcss": "^1.6.2",
|
||||
"webpack": "^4.44.1",
|
||||
"webpack-cli": "^3.3.12",
|
||||
"webpack-fix-style-only-entries": "^0.5.1"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue