Laravel-mix: Copying a dot file such as `.htaccess`

Created on 18 Jul 2017  路  2Comments  路  Source: JeffreyWay/laravel-mix

  • Laravel Mix Version: 1.2.2
  • Node Version 6.9.4
  • NPM Version 3.10.10
  • OS: Windows

Description:

How to copy a dot file such .htaccess using Mix

Steps To Reproduce:

Previously in Elixir this worked: mix.copy('resources/assets/*.htaccess', elixir.config.publicPath + '/').

However, trying the same in Mix (mix.copy('resources/assets/*.htaccess', publicPath + '/')), gives no matches.

Is there new syntax to follow?

Most helpful comment

@u01jmg3

mix.copy('resources/assets/.htaccess', publicPath + '/.htaccess')

Try that. you have to specify the destination file as well for hidden files (or dot files).

All 2 comments

@u01jmg3

mix.copy('resources/assets/.htaccess', publicPath + '/.htaccess')

Try that. you have to specify the destination file as well for hidden files (or dot files).

Works a treat, thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jpriceonline picture jpriceonline  路  3Comments

sdebacker picture sdebacker  路  3Comments

pixieaka picture pixieaka  路  3Comments

Cheddam picture Cheddam  路  3Comments

terion-name picture terion-name  路  3Comments