From 657af90ab28419eacc1b4873541011f353da01ed Mon Sep 17 00:00:00 2001 From: "alexander.akait" Date: Tue, 2 Apr 2024 20:56:58 +0300 Subject: [PATCH] test: fix --- README.md | 2 +- test/__snapshots__/validate-loader-options.test.js.snap | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 461e7b1e..42c3e674 100644 --- a/README.md +++ b/README.md @@ -562,7 +562,7 @@ Default: `false` > **Note** > -> This options will work only when you set `namedExport` to `true` in `css-loader` +> This option will work only when you set `namedExport` to `true` in `css-loader` By default, `mini-css-extract-plugin` generates JS modules based on the `esModule` and `namedExport` options in `css-loader`. Using the `esModule` and `namedExport` options will allow you to better optimize your code. diff --git a/test/__snapshots__/validate-loader-options.test.js.snap b/test/__snapshots__/validate-loader-options.test.js.snap index ed9f18c3..5f9bdadd 100644 --- a/test/__snapshots__/validate-loader-options.test.js.snap +++ b/test/__snapshots__/validate-loader-options.test.js.snap @@ -1,5 +1,12 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`validate options should throw an error on the "defaultExport" option with "1" value 1`] = ` +"Invalid options object. Mini CSS Extract Plugin Loader has been initialized using an options object that does not match the API schema. + - options.defaultExport should be a boolean. + -> Duplicate the named export with CSS modules locals to the default export (only when \`esModules: true\` for css-loader). + -> Read more at https://github.com/webpack-contrib/mini-css-extract-plugin#defaultexports" +`; + exports[`validate options should throw an error on the "esModule" option with "1" value 1`] = ` "Invalid options object. Mini CSS Extract Plugin Loader has been initialized using an options object that does not match the API schema. - options.esModule should be a boolean.