summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSheogorath2018-04-16 21:08:24 +0200
committerSheogorath2018-04-16 21:08:34 +0200
commitc4dba48f7947701865188db51fa96041f6923563 (patch)
tree9d168f42dd67aae1cf352a870a7605f8f9fca5ba
parent8a3cec73c140bd07b5e9e8631eec079ed63dd2a6 (diff)
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
Diffstat (limited to '')
-rw-r--r--README.md3
-rw-r--r--package.json1
-rw-r--r--webpackBaseConfig.js5
3 files changed, 7 insertions, 2 deletions
diff --git a/README.md b/README.md
index 5ab6c849..4f5a4b41 100644
--- a/README.md
+++ b/README.md
@@ -60,7 +60,6 @@ Thanks for using! :smile:
- Database (PostgreSQL, MySQL, MariaDB, SQLite, MSSQL) use charset `utf8`
- npm (and its dependencies, especially [uWebSockets](https://github.com/uWebSockets/uWebSockets#nodejs-developers), [node-gyp](https://github.com/nodejs/node-gyp#installation))
- For **building** HackMD we recommend to use a machine with at least **2GB** RAM
-- (optional) *For development you may need to increase the number of allowed open file descriptors on your machine*
### Instructions
@@ -329,5 +328,5 @@ See more at [http://operational-transformation.github.io/](http://operational-tr
[standardjs-url]: https://github.com/feross/standard
[codetriage-image]: https://www.codetriage.com/hackmdio/hackmd/badges/users.svg
[codetriage-url]: https://www.codetriage.com/hackmdio/hackmd
-[poeditor-image]: https://img.shields.io/badge/POEditor-translate-green.svg
+[poeditor-image]: https://img.shields.io/badge/POEditor-translate-blue.svg
[poeditor-url]: https://poeditor.com/join/project/1OpGjF2Jir
diff --git a/package.json b/package.json
index 6ea8010f..43eb9250 100644
--- a/package.json
+++ b/package.json
@@ -42,6 +42,7 @@
"font-awesome": "^4.7.0",
"formidable": "^1.0.17",
"gist-embed": "~2.6.0",
+ "graceful-fs": "^4.1.11",
"handlebars": "^4.0.6",
"helmet": "^3.3.0",
"highlight.js": "~9.9.0",
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({