-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Closed
Description
hi, I want to deploy all files(including pics/js/css/font) except index.html to my CDN, e.g. http://cdn.example.com, but deploy index.html to my main site: http://www.example.com. Is it possible? I work around for several hours, including set
pathPrefix: 'http://cdn.example.com'in gatsby-config.js.
or modify webpack config in gatsby-node.js
exports.modifyWebpackConfig = ({config, stage}) => {
config.merge({
output: {
publicPath: 'http://localhost:50000000000/',
}
})
return config;
}In create-react-app, I just need to set PUBLIC_URL and in webpack I just need to set publicPath in output.
Is there sth I missing? Any help is welcome. Thanks~
I use https://github.com/gatsbyjs/gatsby-starter-blog/tree/1.0 as a starter, so the package.json file is the same.
Metadata
Metadata
Assignees
Labels
No labels