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 <sheogorath@shivering-isles.com>

[1]:
https://github.com/webpack-contrib/copy-webpack-plugin/issues/59#issuecomment-228563990
[2]: https://github.com/thegcat
This commit is contained in:
Sheogorath
2018-04-16 21:08:24 +02:00
parent 8a3cec73c1
commit c4dba48f79
3 changed files with 7 additions and 2 deletions

View File

@@ -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({