From 35fd136c2a59e0270ed155828c6b18da9d209157 Mon Sep 17 00:00:00 2001 From: sienori Date: Sat, 2 May 2020 01:41:25 +0900 Subject: [PATCH] Fix copied source not building --- webpack.config.dist.js | 10 +++++++++- webpack.utils.js | 5 +++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/webpack.config.dist.js b/webpack.config.dist.js index 174c36c..3709998 100644 --- a/webpack.config.dist.js +++ b/webpack.config.dist.js @@ -135,6 +135,10 @@ module.exports = [ from: `src`, to: path.resolve(__dirname, `${config.tempDirectory}/copiedSource/src/`) }, + { + from: `babel.config.js`, + to: path.resolve(__dirname, `${config.tempDirectory}/copiedSource/babel.config.js`) + }, { from: `config.json`, to: path.resolve(__dirname, `${config.tempDirectory}/copiedSource/config.json`) @@ -147,6 +151,10 @@ module.exports = [ from: `package.json`, to: path.resolve(__dirname, `${config.tempDirectory}/copiedSource/package.json`) }, + { + from: `package-lock.json`, + to: path.resolve(__dirname, `${config.tempDirectory}/copiedSource/package-lock.json`) + }, { from: `README.md`, to: path.resolve(__dirname, `${config.tempDirectory}/copiedSource/README.md`) @@ -164,7 +172,7 @@ module.exports = [ to: path.resolve(__dirname, `${config.tempDirectory}/copiedSource/webpack.utils.js`) } ]), - getZipPlugin(`copiedSource-${config.extName}-${ffExtVersion}`, config.distDirectory) + getZipPlugin(`copiedSource-${config.extName}-${ffExtVersion}`, config.distDirectory, "other/") ] } ]; diff --git a/webpack.utils.js b/webpack.utils.js index b346f84..d6d0ac2 100644 --- a/webpack.utils.js +++ b/webpack.utils.js @@ -73,7 +73,7 @@ const getFirefoxCopyPlugins = (browserDir, outputDir = "dev", sourceDir = "src") ]) ]; -const getZipPlugin = (browserDir, outputDir = "dist") => +const getZipPlugin = (browserDir, outputDir = "dist", exclude = "") => new ZipPlugin({ path: path.resolve(__dirname, `${outputDir}`), filename: browserDir, @@ -86,7 +86,8 @@ const getZipPlugin = (browserDir, outputDir = "dist") => }, zipOptions: { forceZip64Format: false - } + }, + exclude: exclude }); module.exports = {