Skip to content

Adding "config.plugins.delete('html')" throws URIError on pageload #1824

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

Closed
chasegiunta opened this issue Jul 12, 2018 · 1 comment
Closed

Comments

@chasegiunta
Copy link

Version

3.0.0-rc.3

Reproduction link

https://cli.vuejs.org/config/#disable-generating-index-html

Steps to reproduce

module.exports = {
chainWebpack: config => {
    config.plugins.delete('html')
    config.plugins.delete('preload')
    config.plugins.delete('prefetch')
  }
}

and save.

  • Run yarn serve
  • Try to load dev server.

What is expected?

Page load successfully

What is actually happening?

Page load fails with

URIError: Failed to decode param '/%3C%=%20BASE_URL%20%%3Efavicon.ico'
    at decodeURIComponent (<anonymous>)

The exact stack trace is identical to the one referenced here: #1451 though seems a different cause. There is no baseUrl being set in vue.config.js.


This seems to stem from the config.plugins.delete('html') line.

Commenting this out, restarting the dev server, and loading the page works great.

@chasegiunta
Copy link
Author

Ah, figured out what was going on. Didn't realize the devServer was still pointing to public/index.html, thus running into <link rel="icon" href="<%= BASE_URL %>favicon.ico"> and exploding.

So I need to point devServer to the correct file.

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

No branches or pull requests

1 participant