| | |
| | | build7z, |
| | | donation, |
| | | } = require("./src/config"); |
| | | const { |
| | | webpackBarName, |
| | | webpackBanner, |
| | | donationConsole, |
| | | } = require("zx-layouts"); |
| | | |
| | | const { version, author } = require("./package.json"); |
| | | |
| | | const Webpack = require("webpack"); |
| | | const WebpackBar = require("webpackbar"); |
| | | const FileManagerPlugin = require("filemanager-webpack-plugin"); |
| | | const dayjs = require("dayjs"); |
| | | const date = dayjs().format("YYYY_M_D"); |
| | | const time = dayjs().format("YYYY-M-D HH:mm:ss"); |
| | |
| | | plugins: [ |
| | | new Webpack.ProvidePlugin(providePlugin), |
| | | new WebpackBar({ |
| | | name: webpackBarName, |
| | | name: "vue-intergrate", |
| | | }), |
| | | ], |
| | | }; |
| | |
| | | }, |
| | | }, |
| | | }); |
| | | config |
| | | .plugin("banner") |
| | | .use(Webpack.BannerPlugin, [`${webpackBanner}${time}`]) |
| | | .end(); |
| | | config.module |
| | | .rule("images") |
| | | .use("image-webpack-loader") |
| | | .loader("image-webpack-loader") |
| | | .options({ |
| | | bypassOnDebug: true, |
| | | }) |
| | | .end(); |
| | | }); |
| | | |
| | | if (build7z) { |
| | | config.when(process.env.NODE_ENV === "production", (config) => { |
| | | config |
| | | .plugin("fileManager") |
| | | .use(FileManagerPlugin, [ |
| | | { |
| | | onEnd: { |
| | | delete: [`./${outputDir}/video`, `./${outputDir}/data`], |
| | | archive: [ |
| | | { |
| | | source: `./${outputDir}`, |
| | | destination: `./${outputDir}/${abbreviation}_${outputDir}_${date}.7z`, |
| | | }, |
| | | ], |
| | | }, |
| | | }, |
| | | ]) |
| | | .end(); |
| | | }); |
| | | } |
| | | }, |
| | | runtimeCompiler: true, |
| | | productionSourceMap: false, |