vite-plugin-css-svg-mask-image 1.0.3 → 1.0.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.
Files changed (2) hide show
  1. package/dist/index.js +3 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -76,10 +76,11 @@ export function svgMaskPlugin(options = {}) {
76
76
  }
77
77
  },
78
78
  async transform(code, id) {
79
- if (!id.match(/\.(css|scss|sass)$/)) {
79
+ const idPath = id.replace(/\?.*$/, "");
80
+ if (!idPath.match(/\.(css|scss|sass)$/)) {
80
81
  return null;
81
82
  }
82
- const syntax = /\.(scss|sass)$/.test(id) ? postcssScss : undefined;
83
+ const syntax = /\.(scss|sass)$/.test(idPath) ? postcssScss : undefined;
83
84
  const ast = postcss.parse(code, {
84
85
  from: id,
85
86
  ...(syntax && { parser: syntax }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-css-svg-mask-image",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Vite plugin to transform CSS/SCSS files with svg() mask-image function calls to CSS variables",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",