Open derweili opened 3 years ago
There isn't a way to do this right now. But I am happy for a PR to add this feature. Maybe through some environment variables?
Or better yet, we can filter the value from wpackio/enqueue, so that it can be set programmatically.
wpack.io uses the
__wpackIoAppNameOutputPath
variable to get the url of the dist folder as described here https://wpack.io/concepts/how-publicpath-works/For using CDNs, this variable needs to be set to the CDNs URL instead of the WordPress URL. The docs already mention this case:
Unfortunately the docs don't tell how to change the variable to the CDN URL.
I checked the https://github.com/swashata/wp-webpack-script/issues/new repository as well as the https://github.com/swashata/wpackio-enqueue/ repo but I did not find a way to overwrite the
__wpackIoAppNameOutputPath
variable.Is there a way to manually set or overwrite this variable? Did I miss something?