Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.
This repository was archived by the owner on May 29, 2019. It is now read-only.

[4.0.0-beta.0] emitting empty CSS files when using dynamic import #738

@wKovacs64

Description

@wKovacs64

General:

When using dynamic import() code-splitting, ETWP creates an empty (0 byte) CSS file for the main entry point (e.g. main.css) even if no CSS was imported. Additionally, if using optimization.splitChunks.chunks: "all" to split initial chunks in addition to async, it creates an empty CSS file for vendors as well (e.g. vendors~main.css) even if no vendor (node_modules) CSS was imported. I'm assuming these two cases are the same root problem, I just don't know enough about how it works to know for sure.

Real-world use case:

I include CSS from node_modules in my entry point, which gets split into vendors~main.css as expected, but ETWP also creates an empty main.css when I don't have any local CSS imports.

Reproduction repo:

https://github.com/wKovacs64/etwp-empty-files-demo

Versions:

extract-text-webpack-plugin: 4.0.0-beta.0
webpack: 4.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions