From c4dba48f7947701865188db51fa96041f6923563 Mon Sep 17 00:00:00 2001 From: Sheogorath Date: Mon, 16 Apr 2018 21:08:24 +0200 Subject: Fix possible file limit errors As we currently may need higher nofile limits than usual/default on various systems this commit should probide a fix for that an allow to build HackMD without highering these limits and increase security. Inspiration was found in a copy-webpack-plugin-issue[1] and found by @thegcat[2]. Thanks for that! Signed-off-by: Sheogorath [1]: https://github.com/webpack-contrib/copy-webpack-plugin/issues/59#issuecomment-228563990 [2]: https://github.com/thegcat --- webpackBaseConfig.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'webpackBaseConfig.js') diff --git a/webpackBaseConfig.js b/webpackBaseConfig.js index e8630841..793308ea 100644 --- a/webpackBaseConfig.js +++ b/webpackBaseConfig.js @@ -4,6 +4,11 @@ var ExtractTextPlugin = require('extract-text-webpack-plugin') var HtmlWebpackPlugin = require('html-webpack-plugin') var CopyWebpackPlugin = require('copy-webpack-plugin') +// Fix possible nofile-issues +var fs = require('fs') +var gracefulFs = require('graceful-fs') +gracefulFs.gracefulify(fs) + module.exports = { plugins: [ new webpack.ProvidePlugin({ -- cgit v1.2.3