Skip to content

Commit

Permalink
fix: update minify-docker.js for newer @vercel/nft (DIYgod#8628)
Browse files Browse the repository at this point in the history
In commit ad1a095, @vercel/nft is
updated to 0.17.0, and in this version fileList from nft is a set
instead of an array [1].

[1] vercel/nft#240
  • Loading branch information
yan12125 authored Dec 1, 2021
1 parent 0ce2f2f commit 1e87970
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/docker/minify-docker.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ const resultFolder = 'app-minimal';

(async () => {
console.log('Start analyizing...');
const { fileList } = await nodeFileTrace(files, {
const { fileList: fileSet } = await nodeFileTrace(files, {
base: path.resolve(path.join(__dirname, '../..')),
});
const fileList = Array.from(fileSet);
console.log('Total files need to be copy: ' + fileList.length);
return Promise.all(fileList.map((e) => fs.copy(e, path.resolve(path.join(resultFolder, e)))));
})();

0 comments on commit 1e87970

Please sign in to comment.