Closed xqhmz closed 1 year ago
Can you elaborate? I couldn't understand whats needed.
Screenshots are not helpful. Please describe with some detail.
Maybe he means that he wants to remove the dist directory from the zip package and only package the dist subdirectory
Maybe he means that he wants to remove the dist directory from the zip package and only package the dist subdirectory
On the contrary,I hope package the dist directory and the dist subdirectory,now it dose not has the dist directory only has the dist subdirectory
const FileManagerPlugin = require('filemanager-webpack-plugin');
const path = require("path");
module.exports = {
configureWebpack:{
resolve:{
extensions:['.js', '.json', '.vue', '.scss', '.css'],
alias: {
"@": path.resolve(__dirname, "./src"),
"@c": path.resolve(__dirname, "./src/common")
}
}
plugins:[
new FileManagerPlugin({
onEnd:{
delete:["./dist.zip"],
archive:[{source: "./dist", destination: "./dist.zip"}]
}
})
]
}
}
cool, it works
I think that's his want.thanks
Ah. That was the intended behaviour. If you want source directory to be a part of the output archive as well. then you could move it into another directory and zip that.
Ah.I want it also.so what should i do?the mthod move is not easy.
我想压缩后保留dist目录以及子文件,但是不行
我想压缩后保留dist目录以及子文件,但是不行
The same with me.
You could do the following. onEnd accepts an array and guarantees order of execution.
{
"onEnd": [
{
"copy": [{ "source": "./dist", "destination": "./someFolder/dist" }]
},
{
"archive": [
{ "source": "./someFolder/", "destination": "..somelocation.zip" }
]
}
]
}
Closing this as there is a way to solve this.
How to package dist to realize dual directory example: dist.zip/dist/css