Skip to content
This repository has been archived by the owner on Dec 6, 2021. It is now read-only.

Use configured publicPath in watch #470

Merged
merged 1 commit into from
Aug 24, 2018
Merged

Use configured publicPath in watch #470

merged 1 commit into from
Aug 24, 2018

Conversation

dangreaves
Copy link
Contributor

This PR updates the getPublicPath utility to return the configured publicPath during watch mode as well as the currently configured build mode.

My assumption on why getPublicPath exists is that when using the dev server via poi develop, assets are usually served from / instead of the configured asset path. For this reason, I have kept the develop command excluded from the list.

For anyone wishing to override the publicPath across all commands, they can use the chainWebpack hook to force update the configuration.

chainWebpack(config, context) {
  config.output.publicPath("/assets/");
}

This PR should somewhat resolve #460.

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

Successfully merging this pull request may close these issues.

Stop being such smarter than webpack with publicPath
2 participants