Can the directory structure packaged by webpack be modified?

I am currently using a single-page site developed by vue-cli3. When I package it, the directory structure looks like this:

  • dist

    • index.html
    • static

      • css
      • js
      • image

but I want the packaged directory structure to look like this

  • dist

    • index.html
    • css
    • js
    • image
Is there any way to solve this problem?

Jun.06,2022

check to see if your vue.config.js is set to assetsDir to 'static', and change it to''.

Menu