diff --git a/CHANGES.md b/CHANGES.md index 9d0d1f50712..3a3527d6bd7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,7 @@ #### next release (8.7.2) - Add NumberParameterEditor to enable WPS AllowedValues Ranges to be set and use DefaultValue +- Show Cesium's original credit message instead of a custom Terria one when using the default Ion access token. #### 8.7.1 - 2024-04-16 diff --git a/buildprocess/configureWebpack.js b/buildprocess/configureWebpack.js index 964deee41f0..043db0434b5 100644 --- a/buildprocess/configureWebpack.js +++ b/buildprocess/configureWebpack.js @@ -1,6 +1,5 @@ const path = require("path"); const CopyPlugin = require("copy-webpack-plugin"); -const StringReplacePlugin = require("string-replace-webpack-plugin"); const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin"); const ForkTsCheckerNotifierWebpackPlugin = require("fork-ts-checker-notifier-webpack-plugin"); const webpack = require("webpack"); @@ -51,66 +50,6 @@ function configureWebpack( config.module = config.module || {}; config.module.rules = config.module.rules || []; - config.module.rules.push({ - test: /\.js?$/, - include: path.dirname(require.resolve("terriajs-cesium/README.md")), - exclude: [ - // require.resolve("terriajs-cesium/Source/ThirdParty/zip"), - // require.resolve("terriajs-cesium/Source/Core/buildModuleUrl"), - // require.resolve("terriajs-cesium/Source/Core/TaskProcessor") - ], - loader: StringReplacePlugin.replace({ - replacements: [ - // { - // pattern: /buildModuleUrl\([\'|\"|\`](.*)[\'|\"|\`]\)/gi, - // replacement: function (match, p1, offset, string) { - // let p1_modified = p1.replace(/\\/g, "\\\\"); - // return ( - // "require(`" + - // cesiumDir.replace(/\\/g, "\\\\") + - // "/Source/" + - // p1_modified + - // "`)" - // ); - // } - // }, - { - pattern: /Please assign Cesium.Ion.defaultAccessToken<\/i>/g, - replacement: function () { - return 'Please set "cesiumIonAccessToken" in config.json'; - } - }, - { - pattern: / before making any Cesium API calls/g, - replacement: function () { - return ""; - } - } - ] - }) - }); - - // The sprintf module included by Cesium includes a license comment with a big - // pile of links, some of which are apparently dodgy and cause Websense to flag - // web workers that include the comment as malicious. So here we munge URLs in - // comments so broken security software doesn't consider them links that a user - // might actually visit. - config.module.rules.push({ - test: /\.js?$/, - include: path.resolve(cesiumDir, "Source", "ThirdParty"), - loader: StringReplacePlugin.replace({ - replacements: [ - { - pattern: /\/\*[\S\s]*?\*\//g, // find multi-line comments - replacement: function (match) { - // replace http:// and https:// with a spelling-out of it. - return match.replace(/(https?):\/\//g, "$1-colon-slashslash "); - } - } - ] - }) - }); - const zipJsDir = path.dirname(require.resolve("@zip.js/zip.js/package.json")); config.module.rules.push({ @@ -316,7 +255,6 @@ function configureWebpack( }; config.plugins = (config.plugins || []).concat([ - new StringReplacePlugin(), new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/) ]); diff --git a/package.json b/package.json index 0ff928f6192..8ca1a523555 100644 --- a/package.json +++ b/package.json @@ -172,8 +172,6 @@ "sass-loader": "^10", "shpjs": "^4.0.4", "simple-statistics": "^7.0.1", - "string-replace-loader": "^2.1.1", - "string-replace-webpack-plugin": "^0.1.3", "style-loader": "^0.23.1", "styled-components": "^5.3.9", "svg-sprite-loader": "^6.0.11",