@unocss/transformer-compile-class 0.62.2 → 0.62.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 CHANGED
@@ -11,9 +11,9 @@ npm i -D @unocss/transformer-compile-class
11
11
  ```
12
12
 
13
13
  ```ts
14
+ import transformerCompileClass from '@unocss/transformer-compile-class'
14
15
  // uno.config.ts
15
16
  import { defineConfig } from 'unocss'
16
- import transformerCompileClass from '@unocss/transformer-compile-class'
17
17
 
18
18
  export default defineConfig({
19
19
  // ...
package/dist/index.mjs CHANGED
@@ -9,7 +9,7 @@ function transformerCompileClass(options = {}) {
9
9
  alwaysHash = false
10
10
  } = options;
11
11
  const compiledClass = /* @__PURE__ */ new Set();
12
- const regexp = typeof trigger === "string" ? RegExp(`(["'\`])${escapeRegExp(trigger)}\\s([^\\1]*?)\\1`, "g") : trigger;
12
+ const regexp = typeof trigger === "string" ? new RegExp(`(["'\`])${escapeRegExp(trigger)}\\s([^\\1]*?)\\1`, "g") : trigger;
13
13
  return {
14
14
  name: "@unocss/transformer-compile-class",
15
15
  enforce: "pre",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/transformer-compile-class",
3
3
  "type": "module",
4
- "version": "0.62.2",
4
+ "version": "0.62.4",
5
5
  "description": "Compile group of classes into one class",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -33,7 +33,7 @@
33
33
  "dist"
34
34
  ],
35
35
  "dependencies": {
36
- "@unocss/core": "0.62.2"
36
+ "@unocss/core": "0.62.4"
37
37
  },
38
38
  "devDependencies": {
39
39
  "magic-string": "^0.30.11"