diff --git a/cli/cli.ts b/cli/cli.ts
index da977d716fe1..d1195b87bb20 100644
--- a/cli/cli.ts
+++ b/cli/cli.ts
@@ -2647,6 +2647,7 @@ async function buildTargetCoreAsync(options: BuildTargetOptions = {}) {
delete targetlight.compile.compilerExtension;
const targetlightjson = nodeutil.stringify(targetlight);
nodeutil.writeFileSync("built/targetlight.json", targetlightjson)
+ nodeutil.writeFileSync("built/targetlight.js", targetJsPrefix + targetlightjson)
nodeutil.writeFileSync("built/sim.webmanifest", nodeutil.stringify(webmanifest))
console.log("target.json built.");
diff --git a/pxtlib/main.ts b/pxtlib/main.ts
index e73f4b3b6cb2..3f0e5dd573c1 100644
--- a/pxtlib/main.ts
+++ b/pxtlib/main.ts
@@ -229,13 +229,15 @@ namespace pxt {
appTarget = replaceCdnUrlsInJsonBlob(appTarget);
// patch icons in bundled packages
- Object.keys(appTarget.bundledpkgs).forEach(pkgid => {
- const res = appTarget.bundledpkgs[pkgid];
- // path config before storing
- const config = JSON.parse(res[pxt.CONFIG_NAME]) as pxt.PackageConfig;
- if (config.icon) config.icon = pxt.BrowserUtils.patchCdn(config.icon);
- res[pxt.CONFIG_NAME] = pxt.Package.stringifyConfig(config);
- })
+ if (appTarget.bundledpkgs) {
+ Object.keys(appTarget.bundledpkgs).forEach(pkgid => {
+ const res = appTarget.bundledpkgs[pkgid];
+ // path config before storing
+ const config = JSON.parse(res[pxt.CONFIG_NAME]) as pxt.PackageConfig;
+ if (config.icon) config.icon = pxt.BrowserUtils.patchCdn(config.icon);
+ res[pxt.CONFIG_NAME] = pxt.Package.stringifyConfig(config);
+ });
+ }
// patch any pre-configured query url appTheme overrides
if (typeof window !== 'undefined') {
diff --git a/webapp/public/asseteditor.html b/webapp/public/asseteditor.html
index c3de1df8865d..5a72ce91a219 100644
--- a/webapp/public/asseteditor.html
+++ b/webapp/public/asseteditor.html
@@ -24,7 +24,7 @@
// This line gets patched up by the cloud
var pxtConfig = null;
-
+