From 881e25eb918d58924be144674a7c1aa0eaeb5b9c Mon Sep 17 00:00:00 2001 From: puckey Date: Sat, 9 Jun 2018 11:22:33 +0200 Subject: [PATCH 1/4] update cesium and move it to dependencies --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index b75eb922..855fa019 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,6 @@ "homepage": "https://cesiumjs.org", "license": "Apache-2.0", "devDependencies": { - "cesium": "^1.39.0", "copy-webpack-plugin": "^4.0.1", "css-loader": "^0.28.7", "html-webpack-plugin": "^2.30.1", @@ -26,6 +25,9 @@ "webpack": "^3.5.6", "webpack-dev-server": "^2.9.1" }, + "dependencies": { + "cesium": "^1.46.1" + }, "scripts": { "build": "node_modules/.bin/webpack --config webpack.config.js", "start": "node_modules/.bin/webpack-dev-server --config webpack.config.js", From ee2367476ad725f6f1e87af683f0e70ded2c1615 Mon Sep 17 00:00:00 2001 From: puckey Date: Sat, 9 Jun 2018 11:22:56 +0200 Subject: [PATCH 2/4] avoid including node libraries in build --- webpack.config.js | 8 ++++++-- webpack.release.config.js | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 776827b3..80ba0f53 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -25,8 +25,12 @@ module.exports = [{ toUrlUndefined: true }, node: { - // Resolve node module use of fs - fs: "empty" + // Avoid including node libraries + fs: "empty", + http: "empty", + https: "empty", + zlib: "empty", + buffer: "empty" }, resolve: { alias: { diff --git a/webpack.release.config.js b/webpack.release.config.js index ad33b0a7..a13660ff 100644 --- a/webpack.release.config.js +++ b/webpack.release.config.js @@ -26,8 +26,12 @@ module.exports = [{ toUrlUndefined: true }, node: { - // Resolve node module use of fs - fs: "empty" + // Avoid including node libraries + fs: "empty", + http: "empty", + https: "empty", + zlib: "empty", + buffer: "empty" }, resolve: { alias: { From c89e483382c6de19e2f11eca801297cf29f987ce Mon Sep 17 00:00:00 2001 From: puckey Date: Sat, 9 Jun 2018 18:56:14 +0200 Subject: [PATCH 3/4] avoid including url library --- webpack.config.js | 3 ++- webpack.release.config.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 80ba0f53..53bf16ee 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -30,7 +30,8 @@ module.exports = [{ http: "empty", https: "empty", zlib: "empty", - buffer: "empty" + buffer: "empty", + url: "empty" }, resolve: { alias: { diff --git a/webpack.release.config.js b/webpack.release.config.js index a13660ff..0bf7c5ff 100644 --- a/webpack.release.config.js +++ b/webpack.release.config.js @@ -31,7 +31,8 @@ module.exports = [{ http: "empty", https: "empty", zlib: "empty", - buffer: "empty" + buffer: "empty", + url: "empty" }, resolve: { alias: { From 12777ddbf00d7b7953df70a81c923c4e17b64dc9 Mon Sep 17 00:00:00 2001 From: puckey Date: Sat, 9 Jun 2018 19:57:38 +0200 Subject: [PATCH 4/4] fix excluding of Buffer polyfill --- webpack.config.js | 2 +- webpack.release.config.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 53bf16ee..b07eef1c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -27,10 +27,10 @@ module.exports = [{ node: { // Avoid including node libraries fs: "empty", + Buffer: false, http: "empty", https: "empty", zlib: "empty", - buffer: "empty", url: "empty" }, resolve: { diff --git a/webpack.release.config.js b/webpack.release.config.js index 0bf7c5ff..e56d3d97 100644 --- a/webpack.release.config.js +++ b/webpack.release.config.js @@ -28,10 +28,10 @@ module.exports = [{ node: { // Avoid including node libraries fs: "empty", + Buffer: false, http: "empty", https: "empty", zlib: "empty", - buffer: "empty", url: "empty" }, resolve: {