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

v2.16.1 - Passing empty array to chunks option does not create html file #315

Closed
eladlevy opened this issue May 4, 2016 · 5 comments
Closed

Comments

@eladlevy
Copy link

eladlevy commented May 4, 2016

In version 2.16.0 the following webpack configuration created the html file as expected:

new HtmlWebpackPlugin({
            filename: '/path/to/file/generated_page.html',
            template: 'some_page.html',
            chunks: [],
            inject: false
        }),

But in 2.16.1 the html file was not generated. Only omitting chunks option resolved the issue:

new HtmlWebpackPlugin({
            filename: '/path/to/file/generated_page.html',
            template: 'some_page.html',
            inject: false
        }),

I would expect that passing empty array will be equivalent to not passing chunks option like in older versions. Is that a right assumption?

@eladlevy eladlevy changed the title v2.16.1 - passing empty array to chunks option does not create html file v2.16.1 - Passing empty array to chunks option does not create html file May 4, 2016
@graingert
Copy link
Contributor

interestingly this works in dev mode.

Also passing an array with a non existent module in does not work.

@jantimon
Copy link
Owner

jantimon commented May 6, 2016

Oh this is probably because of the hot module replacement "fix":

v2.16.0...v2.16.1#diff-168726dbe96b3ce427e7fedce31bb0bcR76

I guess isHotUpdateCompilation(assets) returns true if the chunks array is empty.
I am on the road right now but will look into it in the next days

@graingert
Copy link
Contributor

@jantimon #319

@jantimon
Copy link
Owner

Fixed in v2.16.2

@lock
Copy link

lock bot commented May 31, 2018

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants