Commit cd4f341 1 parent e5b472d commit cd4f341 Copy full SHA for cd4f341
File tree 2 files changed +24
-3
lines changed
2 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,22 @@ export interface Options {
30
30
*/
31
31
customElement? : boolean | string | RegExp | (string | RegExp )[]
32
32
33
+ /**
34
+ * Enable Vue ref transform (experimental).
35
+ * https://github.com/vuejs/vue-next/tree/master/packages/ref-transform
36
+ *
37
+ * **requires Vue \>= 3.2.5**
38
+ *
39
+ * - `true`: transform will be enabled for all vue,js(x),ts(x) files except
40
+ * those inside node_modules
41
+ * - `string | RegExp`: apply to vue + only matched files (will include
42
+ * node_modules, so specify directories in necessary)
43
+ * - `false`: disable in all cases
44
+ *
45
+ * @default false
46
+ */
47
+ refTransform? : boolean | string | RegExp | (string | RegExp )[]
48
+
33
49
// options to pass on to @vue/compiler-sfc
34
50
script? : Partial <SFCScriptCompileOptions >
35
51
template? : Partial <SFCTemplateCompileOptions >
Original file line number Diff line number Diff line change @@ -58,9 +58,14 @@ export interface Options {
58
58
59
59
/**
60
60
* Enable Vue ref transform (experimental).
61
+ * https://github.com/vuejs/vue-next/tree/master/packages/ref-transform
62
+ *
61
63
* **requires Vue \>= 3.2.5**
62
- * - `true`: transform will be enabled for all vue,js(x),ts(x) files
63
- * - `string | RegExp`: apply to vue + only matched files
64
+ *
65
+ * - `true`: transform will be enabled for all vue,js(x),ts(x) files except
66
+ * those inside node_modules
67
+ * - `string | RegExp`: apply to vue + only matched files (will include
68
+ * node_modules, so specify directories in necessary)
64
69
* - `false`: disable in all cases
65
70
*
66
71
* @default false
@@ -97,7 +102,7 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin {
97
102
refTransform === false
98
103
? ( ) => false
99
104
: refTransform === true
100
- ? createFilter ( / \. ( j | t ) s x ? $ / )
105
+ ? createFilter ( / \. ( j | t ) s x ? $ / , / n o d e _ m o d u l e s / )
101
106
: createFilter ( refTransform )
102
107
103
108
// compat for older verisons
You can’t perform that action at this time.
0 commit comments