diff --git a/ui/packages/consul-ui/ember-cli-build.js b/ui/packages/consul-ui/ember-cli-build.js index aa5d243074..6a1f6bc952 100644 --- a/ui/packages/consul-ui/ember-cli-build.js +++ b/ui/packages/consul-ui/ember-cli-build.js @@ -17,6 +17,7 @@ module.exports = function (defaults, $ = process.env) { $ = utils.env($); const env = EmberApp.env(); + const isProd = ['production'].includes(env); const prodlike = ['production', 'staging']; const devlike = ['development', 'staging']; const sourcemaps = !['production'].includes(env) && !$('BABEL_DISABLE_SOURCEMAPS', false); @@ -197,6 +198,7 @@ module.exports = function (defaults, $ = process.env) { autoImport: { // allows use of a CSP without 'unsafe-eval' directive forbidEval: true, + publicAssetURL: isProd ? '{{.ContentPath}}assets' : undefined, }, codemirror: { keyMaps: ['sublime'],