Skip to content

Images in css not emitted on subsequent builds when using mini-css-extract-plugin with non-persistent build #367

Closed
@OscarBarrett

Description

@OscarBarrett

Expected Behavior

When the webpack build is not persisted (e.g. when using something like clean-webpack-plugin, or webpack-dev-server with contentBase set to false), images referenced in css files should be emitted on subsequent builds if they no longer exist on disk.

Actual Behavior

When using mini-css-extract-plugin, images referenced in css files are not emitted on subsequent builds. With only css-loader they are.

Is an error being thrown?

No

Steps to Reproduce

Minimal reproduction here

Operating System, Node, and NPM dependency versions

Linux, MacOS
Node 8.10

"devDependencies": {
  "clean-webpack-plugin": "^0.1.19",
  "css-loader": "^0.28.11",
  "file-loader": "^1.1.11",
  "hard-source-webpack-plugin": "^0.7.4",
  "mini-css-extract-plugin": "^0.4.0",
  "webpack": "^4.10.2",
  "webpack-cli": "^2.1.4",
  "webpack-dev-server": "^3.1.4"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions