[Vuejs]-Specify the assets output directory when building in development mode

0👍

Because of HMR in development mode this is not yet possible to implement. Here’s the reference to the communication on Vue.js’ forum.

0👍

As per the documentation, you can just copy the assets into your public/assets folder and reference them via absolute path.

https://cli.vuejs.org/guide/html-and-static-assets.html#static-assets-handling

Static assets can be handled in two different ways:

  • Imported in JavaScript or referenced in templates/CSS via relative paths. Such references will be handled by webpack.

  • Placed in the public directory and referenced via absolute paths. These assets will simply be copied and not go through webpack.

Leave a comment