Skip to content

Commit

Permalink
build: 更改构建时的 public path 配置
Browse files Browse the repository at this point in the history
  • Loading branch information
whaoa committed Jan 14, 2022
1 parent b959300 commit 227cd66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ module.exports = function(webpackEnv) {
: isEnvDevelopment && "static/js/[name].chunk.js",
// We inferred the "public path" (such as / or /my-project) from homepage.
// We use "/" in development.
publicPath: publicPath,
publicPath: isEnvProduction ? "./" : publicPath,
// Point sourcemap entries to original disk location (format as URL on Windows)
devtoolModuleFilenameTemplate: isEnvProduction
? (info) => path.relative(paths.appSrc, info.absoluteResourcePath).replace(/\\/g, "/")
Expand Down

0 comments on commit 227cd66

Please sign in to comment.