diff --git a/packages/gatsby/src/utils/webpack.config.js b/packages/gatsby/src/utils/webpack.config.js index 5086c1c86f538..6d0fbf89a2809 100644 --- a/packages/gatsby/src/utils/webpack.config.js +++ b/packages/gatsby/src/utils/webpack.config.js @@ -107,11 +107,7 @@ module.exports = async ( // Add /* filename */ comments to generated require()s in the output. pathinfo: true, // Point sourcemap entries to original disk location (format as URL on Windows) - publicPath: - process.env.GATSBY_WEBPACK_PUBLICPATH || - `${program.ssl ? `https` : `http`}://${ - program.host - }:${webpackPort}/`, + publicPath: process.env.GATSBY_WEBPACK_PUBLICPATH || `/`, devtoolModuleFilenameTemplate: info => path.resolve(info.absoluteResourcePath).replace(/\\/g, `/`), // Avoid React cross-origin errors