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:
parent
0137f498d7
commit
95682f6f94
1 changed files with 11 additions and 1 deletions
|
@ -105,6 +105,16 @@ if (process.env.CI) {
|
||||||
denylist.push('ember-cli-eslint');
|
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) {
|
module.exports = function (defaults) {
|
||||||
let app = new EmberApp(defaults, {
|
let app = new EmberApp(defaults, {
|
||||||
addons: {denylist},
|
addons: {denylist},
|
||||||
|
@ -233,7 +243,7 @@ module.exports = function (defaults) {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
autoImport: {
|
autoImport: {
|
||||||
publicAssetURL: isTesting ? undefined : 'assets/',
|
publicAssetURL,
|
||||||
webpack: {
|
webpack: {
|
||||||
resolve: {
|
resolve: {
|
||||||
fallback: {
|
fallback: {
|
||||||
|
|
Loading…
Add table
Reference in a new issue