Skip to content

Commit afb4173

Browse files
committedFeb 23, 2025·
[gem] Support v-if directive
1 parent 7452477 commit afb4173

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+752
-701
lines changed
 

‎.zed/settings.json

+10
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@
4242
}
4343
},
4444
"vtsls": {
45+
"tsserver": {
46+
"globalPlugins": [
47+
// 不知道为啥没有生效!
48+
{
49+
"location": "packages",
50+
"name": "ts-gem-plugin",
51+
"enableForWorkspaceTypeScriptVersions": true
52+
}
53+
]
54+
},
4555
"settings": {
4656
"typescript": {
4757
"tsdk": "node_modules/typescript/lib",

‎crates/swc-plugin-gem/src/visitors/minify.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ use swc_common::DUMMY_SP;
44
use swc_core::ecma::visit::{noop_visit_mut_type, VisitMut, VisitMutWith};
55
use swc_ecma_ast::{Callee, KeyValueProp, TaggedTpl, Tpl, TplElement};
66

7+
static COMMENT_REG: Lazy<Regex> = Lazy::new(|| Regex::new(r"(?s)/\\*.*\\*/").unwrap());
78
static HEAD_REG: Lazy<Regex> = Lazy::new(|| Regex::new(r"(?s)\s*(\{)\s*").unwrap());
89
static TAIL_REG: Lazy<Regex> = Lazy::new(|| Regex::new(r"(?s)(;|})\s+").unwrap());
910
static SPACE_REG: Lazy<Regex> = Lazy::new(|| Regex::new(r"(?s)\s+").unwrap());
10-
static COMMENT_REG: Lazy<Regex> = Lazy::new(|| Regex::new(r"(?s)/\\*.*\\*/").unwrap());
1111

1212
fn minify_css_style_tpl(tpl: &Tpl) -> Tpl {
1313
Tpl {

0 commit comments

Comments
 (0)