Skip to content
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

Plugin removing html files generated by html-webpack-plugin #10

Closed
ktunkiewicz opened this issue May 24, 2018 · 1 comment
Closed

Plugin removing html files generated by html-webpack-plugin #10

ktunkiewicz opened this issue May 24, 2018 · 1 comment

Comments

@ktunkiewicz
Copy link

  plugins: [
    //new ExtraneousFileCleanupPlugin(),
    new HtmlWebPackPlugin(),
  ],

results in:

                   Asset       Size                 Chunks             Chunk Names
           calculator.js   1.87 MiB             calculator  [emitted]  calculator
              index.html  194 bytes                         [emitted]

But the:

  plugins: [
    new ExtraneousFileCleanupPlugin(),
    new HtmlWebPackPlugin(),
  ],

results in:

                   Asset      Size                 Chunks             Chunk Names
           calculator.js  1.87 MiB             calculator  [emitted]  calculator
@AnujRNair
Copy link
Owner

This is actually the intended functionality of the plugin - it is unopinionated about which files it removes - they only have to have a minimum byte size.

The recommended config for this plugin is:

new ExtraneousFileCleanupPlugin({
  extensions: ['.js']
})

Only js files below 1024 bytes will be removed then :)

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

2 participants