From d1d6d91fa8e6a0a0e766c852c5dc02c8aca2fc36 Mon Sep 17 00:00:00 2001 From: Dillon Kearns Date: Mon, 21 Oct 2019 08:40:22 -0700 Subject: [PATCH] Make XHR request in CLI with xhr2 package. --- generator/src/compile-elm.js | 1 + package-lock.json | 5 +++++ package.json | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/generator/src/compile-elm.js b/generator/src/compile-elm.js index 773343a8..c81e75be 100644 --- a/generator/src/compile-elm.js +++ b/generator/src/compile-elm.js @@ -1,4 +1,5 @@ const { compileToString } = require("node-elm-compiler"); +XMLHttpRequest = require("xhr2"); module.exports = runElm; function runElm(callback) { diff --git a/package-lock.json b/package-lock.json index 0c8233e0..b89f9a37 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12835,6 +12835,11 @@ "xtend": "^4.0.0" } }, + "xhr2": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/xhr2/-/xhr2-0.2.0.tgz", + "integrity": "sha512-BDtiD0i2iKPK/S8OAZfpk6tyzEDnKKSjxWHcMBVmh+LuqJ8A32qXTyOx+TVOg2dKvq6zGBq2sgKPkEeRs1qTRA==" + }, "xml-parse-from-string": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/xml-parse-from-string/-/xml-parse-from-string-1.0.1.tgz", diff --git a/package.json b/package.json index 269d038c..f3b0d96a 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,8 @@ "webpack-dev-middleware": "^3.7.0", "webpack-dev-server": "^3.8.0", "webpack-merge": "^4.2.1", - "workbox-webpack-plugin": "^4.3.1" + "workbox-webpack-plugin": "^4.3.1", + "xhr2": "^0.2.0" }, "devDependencies": { "@types/chokidar": "^2.1.3",