Skip to content

Commit

Permalink
fix(image-plugin): include plugin config
Browse files Browse the repository at this point in the history
- resolves Elderjs#119
  • Loading branch information
noxasch committed Jul 30, 2021
1 parent 9bed571 commit 7daa580
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/images/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const processImages = async ({
images = [],
widths = defaultWidths,
scales = defaultScales,
plugin = {},
s3,
debug,
}) => {
Expand Down Expand Up @@ -286,7 +287,6 @@ const plugin = {
plugin.crossPlatformRoot = plugin.settings.rootDir.replace(/\\/gim, '/');

const imagesToProcess = folders.reduce((out, folder) => {

fs.ensureDirSync(path.join(plugin.settings.distDir, folder.output));
const files = glob.sync(path.join(plugin.settings.rootDir, folder.src + `.{${imageFileTypes.join(',')}}`));
if (Array.isArray(files)) {
Expand Down Expand Up @@ -365,6 +365,7 @@ const plugin = {
images: plugin.imagesToProcess,
widths,
scales,
plugin,
s3: plugin.config.s3,
debug: plugin.config.debug,
});
Expand Down

0 comments on commit 7daa580

Please sign in to comment.