mini-css-extract-plugin
Advanced tools
Comparing version 2.9.0 to 2.9.1
@@ -197,2 +197,3 @@ "use strict"; | ||
const result = function makeResult() { | ||
const defaultExport = typeof options.defaultExport !== "undefined" ? options.defaultExport : false; | ||
if (locals) { | ||
@@ -209,3 +210,2 @@ if (namedExport) { | ||
const exportsString = `export { ${identifiers.map(([id, key]) => `${id} as ${JSON.stringify(key)}`).join(", ")} }`; | ||
const defaultExport = typeof options.defaultExport !== "undefined" ? options.defaultExport : false; | ||
return defaultExport ? `${localsString}\n${exportsString}\nexport default { ${identifiers.map(([id, key]) => `${JSON.stringify(key)}: ${id}`).join(", ")} }\n` : `${localsString}\n${exportsString}\n`; | ||
@@ -215,3 +215,3 @@ } | ||
} else if (esModule) { | ||
return "\nexport {};"; | ||
return defaultExport ? "\nexport {};export default {};" : "\nexport {};"; | ||
} | ||
@@ -218,0 +218,0 @@ return ""; |
{ | ||
"name": "mini-css-extract-plugin", | ||
"version": "2.9.0", | ||
"version": "2.9.1", | ||
"description": "extracts CSS into separate files", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -85,7 +85,7 @@ <div align="center"> | ||
> **Warning** | ||
> [!WARNING] | ||
> | ||
> Note that if you import CSS from your webpack entrypoint or import styles in the [initial](https://webpack.js.org/concepts/under-the-hood/#chunks) chunk, `mini-css-extract-plugin` will not load this CSS into the page. Please use [`html-webpack-plugin`](https://github.com/jantimon/html-webpack-plugin) for automatic generation `link` tags or create `index.html` file with `link` tag. | ||
> **Warning** | ||
> [!WARNING] | ||
> | ||
@@ -166,3 +166,3 @@ > Source maps works only for `source-map`/`nosources-source-map`/`hidden-nosources-source-map`/`hidden-source-map` values because CSS only supports source maps with the `sourceMappingURL` comment (i.e. `//# sourceMappingURL=style.css.map`). If you need set `devtool` to another value you can enable source maps generation for extracted CSS using [`sourceMap: true`](https://github.com/webpack-contrib/css-loader#sourcemap) for `css-loader`. | ||
> **Warning** | ||
> [!WARNING] | ||
> | ||
@@ -227,3 +227,3 @@ > Only for [non-initial (async)](https://webpack.js.org/concepts/under-the-hood/#chunks) chunks. | ||
> **Warning** | ||
> [!WARNING] | ||
> | ||
@@ -259,3 +259,3 @@ > Only for [non-initial (async)](https://webpack.js.org/concepts/under-the-hood/#chunks) chunks. | ||
> **Note** | ||
> [!NOTE] | ||
> | ||
@@ -567,3 +567,3 @@ > It's only applied to dynamically loaded css chunks, if you want to modify link attributes inside html file, please using [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) | ||
> **Note** | ||
> [!NOTE] | ||
> | ||
@@ -600,5 +600,7 @@ > This option will work only when you set `namedExport` to `true` in `css-loader` | ||
loader: "css-loader", | ||
esModule: true, | ||
modules: { | ||
namedExport: true, | ||
options: { | ||
esModule: true, | ||
modules: { | ||
namedExport: true, | ||
}, | ||
}, | ||
@@ -839,3 +841,3 @@ }, | ||
> **Note** | ||
> [!NOTE] | ||
> | ||
@@ -842,0 +844,0 @@ > HMR is automatically supported in webpack 5. No need to configure it. Skip the following: |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
133582
1297