Refactor build script

This commit is contained in:
sienori 2021-09-09 02:06:08 +09:00
parent 7d744c549d
commit 11a31db1cb

View file

@ -114,7 +114,6 @@ module.exports = [
entry: { other: path.resolve(__dirname, `src/background/background.js`) },
output: getOutput("copiedSource", config.tempDirectory),
plugins: [
...getMiniCssExtractPlugin(),
new CopyWebpackPlugin({
patterns: [
{
@ -123,40 +122,11 @@ module.exports = [
info: { minimized: true }
},
{
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`)
},
{
from: `LICENSE`,
to: path.resolve(__dirname, `${config.tempDirectory}/copiedSource/LICENSE`)
},
{
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`)
},
{
from: `webpack.config.dev.js`,
to: path.resolve(__dirname, `${config.tempDirectory}/copiedSource/webpack.config.dev.js`)
},
{
from: `webpack.config.dist.js`,
to: path.resolve(__dirname, `${config.tempDirectory}/copiedSource/webpack.config.dist.js`)
},
{
from: `webpack.utils.js`,
to: path.resolve(__dirname, `${config.tempDirectory}/copiedSource/webpack.utils.js`)
from: "*",
to: path.resolve(__dirname, `${config.tempDirectory}/copiedSource/`),
globOptions: {
ignore: ["**/BACKERS.md", "**/crowdin.yml"]
}
}
]
}),