rollup-plugin-lib-style 2.4.0 → 2.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/lib/index.es.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# rollup-plugin-lib-style
|
|
2
2
|
|
|
3
|
+
[](https://github.com/danielamenou/rollup-plugin-lib-style/blob/main/LICENSE)
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/rollup-plugin-lib-style)
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/rollup-plugin-lib-style)
|
|
8
|
+
|
|
3
9
|
This plugin allows you to import CSS or SASS/SCSS files in your Rollup library and include them in the generated output. The plugin will extract the CSS or SASS/SCSS from the imported files and import them as a CSS file
|
|
4
10
|
|
|
5
11
|
When creating a library, you may want to use CSS modules to create scoped styles for your components. However, when publishing your library as a standalone package, you also need to include the CSS styles that are used by your components. Rollup Plugin Lib Style automates this process by generating a CSS file that includes all the imported CSS modules.
|
package/lib/index.es.js
CHANGED
|
@@ -209,7 +209,7 @@ const libStylePlugin = (options = {}) => {
|
|
|
209
209
|
|
|
210
210
|
const onwarn = (warning, warn) => {
|
|
211
211
|
if (warning.code === "UNRESOLVED_IMPORT" && warning.message.includes(MAGIC_PATH)) return
|
|
212
|
-
warn(warning);
|
|
212
|
+
if (typeof warn === "function") warn(warning);
|
|
213
213
|
};
|
|
214
214
|
|
|
215
215
|
export { libStylePlugin, onwarn };
|
package/lib/index.js
CHANGED
|
@@ -211,7 +211,7 @@ const libStylePlugin = (options = {}) => {
|
|
|
211
211
|
|
|
212
212
|
const onwarn = (warning, warn) => {
|
|
213
213
|
if (warning.code === "UNRESOLVED_IMPORT" && warning.message.includes(MAGIC_PATH)) return
|
|
214
|
-
warn(warning);
|
|
214
|
+
if (typeof warn === "function") warn(warning);
|
|
215
215
|
};
|
|
216
216
|
|
|
217
217
|
exports.libStylePlugin = libStylePlugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollup-plugin-lib-style",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.4",
|
|
4
4
|
"description": "A Rollup plugin that converts CSS and extensions for CSS into CSS modules and imports the generated CSS files",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.es.js",
|