How to add additional asset folder

sage9

#1

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);

#2

I think you were going for something like this

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

#3

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


#4

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


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

Would probably do it.


#6

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


#7

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

What config file is this in?