question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allowing the disabling or removal of the HTMLPlugin

See original GitHub issue

What problem does this feature solve?

I’m using v3.0.0-beta.15 of the CLI.

I have an existing backend that generates it’s down default document. I don’t need an index.html file generated or copied to my output folder.

I’m able to run vue create . in a sub folder of my project. I’ve manually deleted the public folder. Then I’ve created a vue.config.js file and tried the follow 3 options. However, non of these options work in preventing the index.html being copied.

    chainWebpack: config => {
        config.plugin('html').clear();
    }

....

    chainWebpack: config => {
        config.plugins.delete('html');
    }

....

    chainWebpack: config => {
        config.plugins.delete('copy');
    }

What does the proposed API look like?

This configuration setting should work, unless there’s an alternative API already available that would be a better fit.

   chainWebpack: config => {
           config.plugins.delete('html');
   }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

16reactions
Kenvdbcommented, Aug 21, 2018

@Akryum - if you would like to keep it dynamic, you could do following:

let vueConfig = {
    filenameHashing: false,
    pages: {
        index: 'src/main.js',
        subpage: 'src/sub.js'
    },
    chainWebpack: config => {
	Object.keys(vueConfig.pages).forEach(function (key) {
            config.plugins.delete('html-' + key);
            config.plugins.delete('preload-' + key);
            config.plugins.delete('prefetch-' + key);
        });
    }
}

module.exports = vueConfig;
8reactions
mikedidthiscommented, Aug 20, 2018

@MrToy I faced a similar issue with pages:

module.exports = {
    filenameHashing: false,
    pages: {
        index: 'src/main.js',
        subpage: 'src/sub.js'
    },
    chainWebpack: config => {
        config.plugins.delete('html-index')
        config.plugins.delete('preload-index')
        config.plugins.delete('prefetch-index')
        config.plugins.delete('html-subpage')
        config.plugins.delete('preload-subpage')
        config.plugins.delete('prefetch-subpage')
    }
}

To find out the plugin names to delete: vue inspect --plugins.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Disabling or enabling a plugin - Atlassian Documentation
Disabling a plugin · Click the 'Manage Existing' tab. · Locate the plugin that you want to disable and click the title to...
Read more >
Enabling and Disabling Plugins - AresMUSH
Select Admin -> Setup. Select “Enable or Disable Plugins”. Check or uncheck plugins to enable/disable them. Note Even if a plugin is not...
Read more >
Removing and disabling plugins - Jenkins
Jenkins : Removing and disabling plugins. Jenkins allows you to disable a plugin as well as uninstall a plugin. What are the difference?...
Read more >
How to Disable CSS and JavaScript Added by Plugins
How to Disable CSS and JavaScript Added by Plugins ; Step 1: Get the ID; Step 2: Dequeue script or style; Real live...
Read more >
Removing/Suppressing 'You may use these HTML tags ...
Based on other comments I have found, I removed the code from the form-topic, -reply and -forum.php files (code= the php around <p...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found