Khaleel
Khaleel

Reputation: 1371

Webpack output only creates dist folder not dist.zip

I'm new to webpack. I'm trying to build my Vue webpack cli project. when done the dist folder is created successfully. but I need to have a dist.zip folder which needs to be passed in the CICD pipeline on the go to next task. Is there any build config change required to make the output as zip package instead of mere folder?

Upvotes: 0

Views: 3753

Answers (1)

Parag Diwan
Parag Diwan

Reputation: 3956

You need to have a custom plugin like webpack-zip-plugin.

and then you can do something like

module.exports = {
  ...
  plugins: [
    new WebpackZipPlugin({
      frontShell: 'ls'
      initialFile: './dist',
      endPath: './buildPath',
      zipName: '[name].zip',
      behindShell: 'scp ***'
    })
  ]
}

For more details visit here.

Hope this helps.

Upvotes: 1

Related Questions