Update copy-webpack-plugin
This commit is contained in:
parent
7848a1d9e8
commit
7ca3711ad3
|
@ -20,7 +20,7 @@
|
|||
"babel-loader": "^8.0.0-beta.3",
|
||||
"babel-plugin-transform-class-properties": "^6.24.1",
|
||||
"clean-webpack-plugin": "^0.1.19",
|
||||
"copy-webpack-plugin": "^5.1.1",
|
||||
"copy-webpack-plugin": "^6.4.1",
|
||||
"css-loader": "^3.5.3",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"mini-css-extract-plugin": "^0.5.0",
|
||||
|
|
|
@ -130,7 +130,8 @@ module.exports = [
|
|||
entry: { other: path.resolve(__dirname, `src/background/background.js`) },
|
||||
output: getOutput("copiedSource", config.tempDirectory),
|
||||
plugins: [
|
||||
new CopyWebpackPlugin([
|
||||
new CopyWebpackPlugin({
|
||||
patterns: [
|
||||
{
|
||||
from: `src`,
|
||||
to: path.resolve(__dirname, `${config.tempDirectory}/copiedSource/src/`)
|
||||
|
@ -171,7 +172,8 @@ module.exports = [
|
|||
from: `webpack.utils.js`,
|
||||
to: path.resolve(__dirname, `${config.tempDirectory}/copiedSource/webpack.utils.js`)
|
||||
}
|
||||
]),
|
||||
]
|
||||
}),
|
||||
getZipPlugin(`copiedSource-${config.extName}-${ffExtVersion}`, config.distDirectory, "other/")
|
||||
]
|
||||
}
|
||||
|
|
|
@ -40,7 +40,8 @@ const getEntry = (sourceDir = "src") => {
|
|||
};
|
||||
|
||||
const getCopyPlugins = (browserDir, outputDir = "dev", sourceDir = "src") => [
|
||||
new CopyWebpackPlugin([
|
||||
new CopyWebpackPlugin({
|
||||
patterns: [
|
||||
{
|
||||
from: `${sourceDir}/icons`,
|
||||
to: path.resolve(__dirname, `${outputDir}/${browserDir}/icons`)
|
||||
|
@ -53,11 +54,13 @@ const getCopyPlugins = (browserDir, outputDir = "dev", sourceDir = "src") => [
|
|||
from: `${sourceDir}/manifest-chrome.json`,
|
||||
to: path.resolve(__dirname, `${outputDir}/${browserDir}/manifest.json`)
|
||||
}
|
||||
])
|
||||
]
|
||||
})
|
||||
];
|
||||
|
||||
const getFirefoxCopyPlugins = (browserDir, outputDir = "dev", sourceDir = "src") => [
|
||||
new CopyWebpackPlugin([
|
||||
new CopyWebpackPlugin({
|
||||
patterns: [
|
||||
{
|
||||
from: `${sourceDir}/icons`,
|
||||
to: path.resolve(__dirname, `${outputDir}/${browserDir}/icons`)
|
||||
|
@ -70,7 +73,8 @@ const getFirefoxCopyPlugins = (browserDir, outputDir = "dev", sourceDir = "src")
|
|||
from: `${sourceDir}/manifest-firefox.json`,
|
||||
to: path.resolve(__dirname, `${outputDir}/${browserDir}/manifest.json`)
|
||||
}
|
||||
])
|
||||
]
|
||||
})
|
||||
];
|
||||
|
||||
const getZipPlugin = (browserDir, outputDir = "dist", exclude = "") =>
|
||||
|
|
Loading…
Reference in a new issue