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