Skip to content

fix(webpack): slash on publicPath: 'auto' #6506

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2021

Conversation

tomicakr
Copy link
Contributor

@tomicakr tomicakr commented Jun 1, 2021

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Underlying tools
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

Other information:
Webpack 5 introduced an 'auto' publicPath feature in webpack/pull/11258. The ensureSlash will currently add the slash regardless of the actual public path, so the feature would be obsolete.

I encountered the problem while creating a micro-frontend with the webpack 5's module federation. We want the public path to be the one micro frontend is deployed to, which webpack can automatically infer(module-federation/#infer-publicpath-from-script, there is a tip at the end of the paragraph).

@tomicakr tomicakr changed the title fix(publicPath): slash on publicPath: 'auto' fix(webpack): slash on publicPath: 'auto' Jun 1, 2021
Copy link
Member

@haoqunjiang haoqunjiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@haoqunjiang haoqunjiang merged commit 9f2aa63 into vuejs:dev Jun 3, 2021
@satawait
Copy link

BASE_URL was changed to 'auto', how to solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants