rollup-plugin-lib-style 2.3.1 → 2.3.2

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
@@ -162,11 +162,12 @@ const libStylePlugin = (options = {}) => {
162
162
 
163
163
  const cssFilePath = customCSSPath ? customCSSPath(id) : getFilePath();
164
164
  const cssFileInjectedPath = customCSSInjectedPath ? customCSSInjectedPath(cssFilePath) : cssFilePath;
165
+ const cssFilePathWithoutSlash = cssFilePath.startsWith("/") ? cssFilePath.substring(1) : cssFilePath;
165
166
 
166
167
  // create a new css file with the generated hash class names
167
168
  this.emitFile({
168
169
  type: "asset",
169
- fileName: cssFilePath.replace("/", "").replace(loader.regex, ".css"),
170
+ fileName: cssFilePathWithoutSlash.replace(loader.regex, ".css"),
170
171
  source: postCssResult.extracted.code,
171
172
  });
172
173
 
package/lib/index.js CHANGED
@@ -164,11 +164,12 @@ const libStylePlugin = (options = {}) => {
164
164
 
165
165
  const cssFilePath = customCSSPath ? customCSSPath(id) : getFilePath();
166
166
  const cssFileInjectedPath = customCSSInjectedPath ? customCSSInjectedPath(cssFilePath) : cssFilePath;
167
+ const cssFilePathWithoutSlash = cssFilePath.startsWith("/") ? cssFilePath.substring(1) : cssFilePath;
167
168
 
168
169
  // create a new css file with the generated hash class names
169
170
  this.emitFile({
170
171
  type: "asset",
171
- fileName: cssFilePath.replace("/", "").replace(loader.regex, ".css"),
172
+ fileName: cssFilePathWithoutSlash.replace(loader.regex, ".css"),
172
173
  source: postCssResult.extracted.code,
173
174
  });
174
175
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rollup-plugin-lib-style",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
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",