# Video folder not assets to DIST folder [solved]

**URL:** https://discourse.roots.io/t/video-folder-not-assets-to-dist-folder-solved/15116
**Category:** sage
**Tags:** webpack
**Created:** 2019-03-19T17:07:11Z
**Posts:** 5

## Post 1 by @rerege — 2019-03-19T17:07:11Z

Hallo,  
amateur question.  
What can I asset my folder video? I read link in this forum, but there was solution via gulpfile.js, but it doesnt exist in my project.

my example:  
resources/assets/video

after:  
yarn build  
yarn start

I get link to folder /dist/video/…mp4, but the folder dist contains only  
images  
scripts  
(+styles in cache)

What can I add my folder video? config.js? If yes, how?

Thank you for help

Vana

---

## Post 2 by @alwaysblank — 2019-03-19T17:17:45Z

The following section of `webpack.config.js` configures which files are copied during the build process (which I assume is all you want to do with your videos—if you need to process them in some way you would need to add a different loader to do that).

> <https://github.com/roots/sage/blob/f3e794a09374d2f110742d15b9b975490fcddbee/resources/assets/build/webpack.config.js#L146-L150>

The following line in `config.js` allows you to specify a glob that is used to by the above code to determine which files to copy, so you’d want to adjust it to include your `video` directory and the files within it.

> <https://github.com/roots/sage/blob/f3e794a09374d2f110742d15b9b975490fcddbee/resources/assets/build/config.js#L16>

---

## Post 3 by @rerege — 2019-03-19T17:39:01Z

> [@alwaysblank](#):
>
> copy: ‘images/\*\*/\*’,

uf, uf… yes, I want only copy from resources to dist…  
So, how can I modify config.js?

const config = merge({  
open: true,  
copy: ‘images/\*\*/\*’,

copy: ‘video/\*\*/\*’, \<\<propably stupid !

proxyUrl: ‘[http://localhost:3000](http://localhost:3000)’,

---

## Post 4 by @alwaysblank — 2019-03-19T17:54:55Z

If you take a look at the source for `copy-globs-webpack-plugin`, the tool that’s being used to copy these files, you can see the format that it expects globs to be in:

> <https://github.com/QWp6t/copy-globs-webpack-plugin/blob/e8b7491f35f31ebbe7bb1d5c6c61b6c01d3c954f/src/CopyGlobsWebpackPlugin.js#L20-L32>

So in your case you would probably want:

```
copy: '(images|video)/**/*',
```

Globs are used quite a bit in the Sage webpack configuration, so I’d strongly recommend reading up on how they work: [https://github.com/isaacs/node-glob#glob-primer](https://github.com/isaacs/node-glob#glob-primer)

---

## Post 5 by @rerege — 2019-03-20T09:42:06Z

@alwaysblank  
Hi Ben, thank you very much for your answer… Big help!  
Finally for me was correct this coding writting: **copy: '+(video|images)/**/\*’,\*\*

---

## Post 6 by @system — 2019-04-30T17:07:12Z

This topic was automatically closed after 42 days. New replies are no longer allowed.
