rollup-plugin-lib-style 1.2.2 → 1.2.3

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/lib/index.es.js CHANGED
@@ -3,7 +3,6 @@ import postcss from 'postcss';
3
3
  import postcssModules from 'postcss-modules';
4
4
  import fs from 'fs-extra';
5
5
  import sass from 'sass';
6
- import path from 'path';
7
6
  import glob from 'glob';
8
7
 
9
8
  const defaultScopedName = "[local]_[hash:base64:6]";
@@ -142,13 +141,10 @@ const libStylePlugin = (options = {}) => {
142
141
  async closeBundle() {
143
142
  if (!importCSS) return
144
143
 
145
- const importers = [];
146
- modulesIds.forEach((id) => this.getModuleInfo(id).importers.forEach((importer) => importers.push(path.parse(importer).name + ".js"))); // TODO - add number pattern for duplicate name files
147
-
148
144
  // get all the modules that import CSS files
149
145
  const importersPaths = outputPaths
150
146
  .reduce((result, currentPath) => {
151
- result.push(glob.sync(`${currentPath}/**/*(${importers.join("|")})`));
147
+ result.push(glob.sync(`${currentPath}/**/*.js`));
152
148
  return result
153
149
  }, [])
154
150
  .flat();
package/lib/index.js CHANGED
@@ -7,7 +7,6 @@ var postcss = require('postcss');
7
7
  var postcssModules = require('postcss-modules');
8
8
  var fs = require('fs-extra');
9
9
  var sass = require('sass');
10
- var path = require('path');
11
10
  var glob = require('glob');
12
11
 
13
12
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -16,7 +15,6 @@ var postcss__default = /*#__PURE__*/_interopDefaultLegacy(postcss);
16
15
  var postcssModules__default = /*#__PURE__*/_interopDefaultLegacy(postcssModules);
17
16
  var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
18
17
  var sass__default = /*#__PURE__*/_interopDefaultLegacy(sass);
19
- var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
20
18
  var glob__default = /*#__PURE__*/_interopDefaultLegacy(glob);
21
19
 
22
20
  const defaultScopedName = "[local]_[hash:base64:6]";
@@ -155,13 +153,10 @@ const libStylePlugin = (options = {}) => {
155
153
  async closeBundle() {
156
154
  if (!importCSS) return
157
155
 
158
- const importers = [];
159
- modulesIds.forEach((id) => this.getModuleInfo(id).importers.forEach((importer) => importers.push(path__default["default"].parse(importer).name + ".js"))); // TODO - add number pattern for duplicate name files
160
-
161
156
  // get all the modules that import CSS files
162
157
  const importersPaths = outputPaths
163
158
  .reduce((result, currentPath) => {
164
- result.push(glob__default["default"].sync(`${currentPath}/**/*(${importers.join("|")})`));
159
+ result.push(glob__default["default"].sync(`${currentPath}/**/*.js`));
165
160
  return result
166
161
  }, [])
167
162
  .flat();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rollup-plugin-lib-style",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
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",