message: refactor: use async / await in copyNextPages
diff: @@ -6,13 +6,14 @@ const logger = require("../utils/logger");
  const readdirAsync = promisify(fs.readdir);
  const copyFileAsync = promisify(fs.copyFile);
  -module.exports = (nextBuildDir, pluginBuildDirObj) => {
  +module.exports = async (nextBuildDir, pluginBuildDirObj) => {
  logger.log("Copying next pages to tmp build folder");
  const pagesBuildDir = path.join(nextBuildDir, "serverless/pages");
  - return pluginBuildDirObj.setupBuildDir().then(() => {
  - return readdirAsync(pagesBuildDir).then(pageFiles => {
  + await pluginBuildDirObj.setupBuildDir();
  + const pageFiles = await readdirAsync(pagesBuildDir);
  +
  const copyFilePromises = pageFiles.map(pf => {
  const src = path.join(pagesBuildDir, pf);
  const dest = path.join(pluginBuildDirObj.buildDir, pf);
  @@ -21,6 +22,4 @@ module.exports = (nextBuildDir, pluginBuildDirObj) => {
  });
  return Promise.all(copyFilePromises);
  - });
  - });
  };
  