Skip to content

Commit 8539fb9

Browse files
committed
fix: cdn url
1 parent a77ff7c commit 8539fb9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nuxt.config.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ require('dotenv').config();
22

33
const isProd = process.env.NODE_ENV === 'production';
44
const STATIC_URL = isProd
5-
? process.env.CDN_DOMAIN
6-
: `http://localhost:${parseInt(process.env.PORT, 10) || 8000}`
5+
? `https://${process.env.CDN_DOMAIN}/`
6+
: `http://localhost:${parseInt(process.env.PORT, 10) || 8000}/`
77

88
module.exports = {
99
head: {
@@ -40,7 +40,7 @@ module.exports = {
4040
// ********* Notice ***********
4141
// ********* If prod and set CDN_DOMAIN, setup publicPath to it
4242
if (!isDev && process.env.CDN_DOMAIN) {
43-
config.output.publicPath = process.env.CDN_DOMAIN
43+
config.output.publicPath = `https://${process.env.CDN_DOMAIN}/`
4444
}
4545
},
4646
},

0 commit comments

Comments
 (0)