From 1cab2dd66f32ef28cee86b850e22b9b5cea18917 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Mon, 18 Sep 2017 16:39:03 +0100 Subject: [PATCH] Improved built JS compat w/ CloudFlare Auto Minify (#861) refs TryGhost/Ghost#8815, TryGhost/Ghost#8840, TryGhost/Ghost#8842, TryGhost/Ghost#8849 - `ember-cli` 2.14 introduced some [new defaults for uglify-js](https://github.com/ember-cli/ember-cli/pull/7077) that resulted in CloudFlare's Auto Minify feature mangling the JS files and causing syntax errors - revert the `semicolons: false` option to restore compatibility **Note:** This does _not_ mean it's recommended to use CloudFlare's Auto Minify feature. It's still recommended that all CloudFlare's performance settings are [disabled for /ghost* URLs](https://docs.ghost.org/docs/troubleshooting#section-ghost-admin-not-loading) --- ghost/admin/ember-cli-build.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ghost/admin/ember-cli-build.js b/ghost/admin/ember-cli-build.js index eebedcf664..bd0d255ea1 100644 --- a/ghost/admin/ember-cli-build.js +++ b/ghost/admin/ember-cli-build.js @@ -134,6 +134,13 @@ module.exports = function (defaults) { enabled: true, extensions: ['js', 'css', 'png', 'jpg', 'jpeg', 'gif', 'map'] }, + minifyJS: { + options: { + output: { + semicolons: true + } + } + }, nodeAssets: { 'blueimp-md5': { import: ['js/md5.js']