0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

Configured auto-imported assets to load from supplied URL

refs https://github.com/TryGhost/DevOps/issues/47

- this allows us to optionally configure a URL to set as the CDN URL in
  Admin
This commit is contained in:
Daniel Lockyer 2023-07-14 16:21:43 +02:00 committed by Daniel Lockyer
parent 0137f498d7
commit 95682f6f94

View file

@ -105,6 +105,16 @@ if (process.env.CI) {
denylist.push('ember-cli-eslint');
}
let publicAssetURL;
if (isTesting) {
publicAssetURL = undefined;
} else if (process.env.GHOST_CDN_URL) {
publicAssetURL = process.env.GHOST_CDN_URL + 'assets/';
} else {
publicAssetURL = 'assets/';
}
module.exports = function (defaults) {
let app = new EmberApp(defaults, {
addons: {denylist},
@ -233,7 +243,7 @@ module.exports = function (defaults) {
}
},
autoImport: {
publicAssetURL: isTesting ? undefined : 'assets/',
publicAssetURL,
webpack: {
resolve: {
fallback: {