diff --git a/.htaccess b/.htaccess index c37b5cc41f..2695b31506 100644 --- a/.htaccess +++ b/.htaccess @@ -24,8 +24,10 @@ Options -Indexes # Skip redirect for `client` dir. RewriteRule ^client/ - [L] +# {#dev} # Skip redirect for `node_modules` dir. Actual only for dev environment. RewriteRule ^node_modules/ - [L] +# {/dev} # Store base path. RewriteCond %{REQUEST_URI}::$1 ^(.*?/)(.*)::\2$ diff --git a/Gruntfile.js b/Gruntfile.js index 1187fc7a90..570ea7a9fc 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -272,8 +272,25 @@ module.exports = grunt => { dest: 'build/tmp/application/Espo/Resources/defaults/config.php', } ], - } + }, + dev: { + options: { + patterns: [ + { + match: /\# \{\#dev\}(.*)\{\/dev\}/gs, + replacement: '', + } + ] + }, + files: [ + { + src: 'build/tmp/.htaccess', + dest: 'build/tmp/.htaccess', + } + ], + }, }, + }); grunt.registerTask('chmod-folders', () => {