From 8280727a8bddba69b6927e460f755e464f06429d Mon Sep 17 00:00:00 2001 From: Shishir Date: Tue, 29 Nov 2016 11:59:28 -0800 Subject: [PATCH] adding support for "browser" field Adding the "browser" field to package.json. For details, see: https://github.com/defunctzombie/package-browser-field-spec Useful when one is not using bower to install this package. Atleast webpack seems to pick this up without issue. Webpack seems to support it - seems like an elegant solution for mixed usage libraries. Seems to be a better solution than #27 https://github.com/BigstickCarpet/json-schema-ref-parser/issues/27 --- package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 3ee55893..f61c2353 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,9 @@ "release": "npm run upgrade && npm test && npm run bump && npm publish", "start": "npm run watch & http-server -o -c-1" }, + "browser": { + "fs": false + }, "repository": { "type": "git", "url": "https://github.com/BigstickCarpet/json-schema-ref-parser.git" @@ -69,4 +72,4 @@ "ono": "^2.2.1", "z-schema": "^3.17.0" } -} \ No newline at end of file +}