Commit 11490842 authored by YIyiyi's avatar YIyiyi

feat:添加打包插件

parent 98f58d18
.DS_Store
node_modules
/dist
样表管理系统.zip
# local env files
.env.local
......
......@@ -5,7 +5,7 @@
"scripts": {
"dev": "vue-cli-service serve",
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"build": "vue-cli-service build --mode production",
"test": "vue-cli-service build --mode test",
"lint": "vue-cli-service lint",
"stage": "vue-cli-service build --mode stage",
......@@ -42,6 +42,7 @@
"@vue/cli-service": "~5.0.0",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3",
"filemanager-webpack-plugin": "^8.0.0",
"less": "^4.0.0",
"less-loader": "^8.0.0",
"svg-sprite-loader": "^4.1.6",
......
......@@ -329,4 +329,4 @@ export default {
.el-switch .el-switch__label {
width: 60px !important; /*开关按钮的宽度大小*/
}
</style>
\ No newline at end of file
</style>
......@@ -77,23 +77,24 @@ export default {
methods: {
// 选择使用皮肤
async changeSkin(device, row) {
if (row.check === "1") {
// let obj = {
// skin_id: "",
// css_path: "",
// skin_name: "",
// previewImagePath: "",
// skinFieldList: "",
// device,
// };
row.check = "0";
console.log(check, device);
// if (code === 1) {
// this.$message.success("设置" + msg);
// }
} else {
row.check = "1";
}
// if (row.check === "1") {
// // let obj = {
// // skin_id: "",
// // css_path: "",
// // skin_name: "",
// // previewImagePath: "",
// // skinFieldList: "",
// // device,
// // };
// row.check = "0";
// console.log(check, device);
// // if (code === 1) {
// // this.$message.success("设置" + msg);
// // }
// } else {
// row.check = "1";
// }
console.log(device, row);
},
// 预览皮肤
handlePreview(url) {
......
const { defineConfig } = require('@vue/cli-service')
const { defineConfig } = require("@vue/cli-service");
const FileManagerPlugin = require("filemanager-webpack-plugin"); // 压缩文件夹
const isDev = process.env.NODE_ENV === "development";
let plugins = [];
// 避免打本地启项目时自动打zip包
if (!isDev) {
plugins.push(
new FileManagerPlugin({
events: {
onEnd: {
mkdir: ["./dist"],
delete: ["./样表管理系统.zip"],
archive: [{ source: "./dist", destination: "./样表管理系统.zip" }],
},
},
})
);
}
module.exports = defineConfig({
transpileDependencies: true,
productionSourceMap: false,
assetsDir: 's',
lintOnSave:false,
devServer: {
port: 8086,
hot: "only",//自动保存
proxy: {
'/sampleform': {
target: 'http://localhost:17215',
changeOrigin: true,
secure: false,
cookieDomainRewrite: 'localhost',
}
}
}
})
// webpack 插件
configureWebpack: {
plugins: [...plugins],
},
transpileDependencies: true,
// 打包输出目录
outputDir: "dist/dist",
publicPath: "./",
});
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment