Only apply CDN fix to webpack in prod
This commit is contained in:
@@ -28,6 +28,9 @@ module.exports = async function (env, argv) {
|
|||||||
]
|
]
|
||||||
if (env.mode === 'development') {
|
if (env.mode === 'development') {
|
||||||
config.plugins.push(new ReactRefreshWebpackPlugin())
|
config.plugins.push(new ReactRefreshWebpackPlugin())
|
||||||
|
} else {
|
||||||
|
// Support static CDN for chunks
|
||||||
|
config.output.publicPath = 'auto'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GENERATE_STATS || OPEN_ANALYZER) {
|
if (GENERATE_STATS || OPEN_ANALYZER) {
|
||||||
|
|||||||
Reference in New Issue
Block a user