How to add additional asset folder

I’m trying to add an audio folder to assets that will be copied over to dist. I tried this in the config: copy: '(images|audio)/**/*', – any idea?

Full config:

const config = merge({
  open: true,
  copy: '(images|audio)/**/*',
  proxyUrl: 'http://localhost:3000',
  cacheBusting: '[name]_[hash]',
  paths: {
    root: rootPath,
    assets: path.join(rootPath, 'resources/assets'),
    dist: path.join(rootPath, 'dist'),
  },
  enabled: {
    sourceMaps: !isProduction,
    optimize: isProduction,
    cacheBusting: isProduction,
    watcher: !!argv.watch,
  },
  watch: [],
}, userConfig);

I think you were going for something like this

'+(images|audio)/**/*'
1 Like

Thank you. That “+” is what I needed!

Is there a way to prevent cache busting on a folder added this method?

enabled: {
    sourceMaps: !isProduction,
    optimize: isProduction,
    cacheBusting: false,
    watcher: !!argv.watch,
},

Would probably do it.

1 Like

Thanks. I was looking for a solution for one folder, not all of them. I went a different route.

'+(images|audio)/**/*'

What config file is this in?