diff --git a/packages/beasties-webpack-plugin/src/index.js b/packages/beasties-webpack-plugin/src/index.js index 38b3f8a..e4dd3e2 100644 --- a/packages/beasties-webpack-plugin/src/index.js +++ b/packages/beasties-webpack-plugin/src/index.js @@ -175,7 +175,7 @@ export default class BeastiesWebpackPlugin extends Beasties { if (!sheet) { try { - sheet = await this.readFile(this.compilation, filename) + sheet = await this.readFile(filename) this.logger.warn( `Stylesheet "${relativePath}" not found in assets, but a file was located on disk.${ this.options.pruneSource diff --git a/packages/beasties-webpack-plugin/test/fixtures/fs-access/dist/style.css b/packages/beasties-webpack-plugin/test/fixtures/fs-access/dist/style.css new file mode 100644 index 0000000..7a75bb8 --- /dev/null +++ b/packages/beasties-webpack-plugin/test/fixtures/fs-access/dist/style.css @@ -0,0 +1 @@ +div.foo{color:red} diff --git a/packages/beasties-webpack-plugin/test/fixtures/fs-access/index.html b/packages/beasties-webpack-plugin/test/fixtures/fs-access/index.html new file mode 100644 index 0000000..5cfed2b --- /dev/null +++ b/packages/beasties-webpack-plugin/test/fixtures/fs-access/index.html @@ -0,0 +1,12 @@ + + +
+ +