Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
vue-browscan
Search
cyber_snufkin
August 20, 2025
Technology
180
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
vue-browscan
cyber_snufkin
August 20, 2025
More Decks by cyber_snufkin
See All by cyber_snufkin
2023/10/28 Vue Fes Tokyo Vue.js プロジェクト設計のベストプラクティスを求めて
cyber_snufkin
5
3.8k
Vue.jsの今までをざっくり
cyber_snufkin
1
3.3k
PWAの"A"から始まる話
cyber_snufkin
1
1.3k
Other Decks in Technology
See All in Technology
PHPカンファレンス関西の招待状 / Invitation to PHP Conference Kansai
ykanoh
0
110
10年後、Engineering 行為を剥奪されるとして、わたしたちは、どう、何を創ればいいだろうか。 / If Engineering Is Taken Away in 10 Years, How and What Should We Create?
bitkey
PRO
1
190
Conditional PED-ANOVA: Hyperparameter Importance in Hierarchical & Dynamic Search Spaces
pfn
PRO
0
130
初海外で注意すべきこと12選!!!安全快適なre:invent生活にするために
yuuuuuuu168
1
160
Active Record Connection Adaptersにおける長年の課題に再び取り組む
yahonda
0
140
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
770
AIカンパニーへの転換を支えた、エンジニアの仕事の再定義
kworkdev
PRO
2
1.2k
実体験から学ぶ分析エージェントの開発と運⽤
recruitengineers
PRO
8
2.4k
DWH の限界突破! AI エージェント向け爆速リアルタイムデータ基盤 ClickHouse
jozono
1
470
しろおびから始める!ログ活用の第一歩
shumei_ito
0
950
AI導入は済んだ。次は統制を作り替える番だ_AI×開発組織 Summit 2026
techtekt
PRO
0
210
AIにシークレットを見せない、WSL2で安全な開発環境
yazm
0
300
Featured
See All Featured
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
440
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
730
Accessibility Awareness
sabderemane
1
250
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
630
Thoughts on Productivity
jonyablonski
76
5.4k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
890
Un-Boring Meetings
codingconduct
0
460
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
540
Designing Powerful Visuals for Engaging Learning
tmiket
1
610
Balancing Empowerment & Direction
lara
6
1.3k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
480
We Are The Robots
honzajavorek
0
400
Transcript
解析ツール作ってる話
自己紹介 安積洋 (@cyber_snufkin) Software Engineer LAMP環境何でも屋 > Vueでフロントエンド(ver0.11の頃) > スマートフォンアプリ
PjM > 行動解析 > リーガルテックのフロントエンド Vue.jsはVer0.11 > Ver1 > Ver2 > Ver3 Vue Fes 2023 登壇
日常
vue-browscan SFCごとの「このCSSを理解できる最小ブラウザ」を静的解析で算出するCLI (読み:ビューブラウスキャン / Vue Browser Scan)
なぜ必要? • プロジェクトで「どのブラウザをどこまでサポートできるか」が曖昧になりがち • PostCSSのターゲット指定だけでは、実際に書かれたCSS機能を網羅できない • Vue SFCは template/script/style の多言語混在で見落としが発生
• リリース判断で「最小UAの根拠」を即提示できず、レビュー工数が増える
None
何をするツール? • SFCごと(ブロック解析→ファイル集計)に、CSS機能から最小対応ブラウザを計算 • 互換データ:@mdn/browser-compat-data(BCD) • 解析基盤:Stylelint(API) • 出力:JSON(ブロック単位)/CSV(ファイル単位) •
付加情報:ブラウザのバージョン+リリース日
どう動く?(フロー) • 1) ディレクトリを再帰走査 → .vue/.css/.scss/.less/.pcss • 2) Vue SFCを
template/script/style に分解 • 3) <style> と外部CSS系を Stylelintで解析 → 機能ID抽出 • 4) BCDで各ブラウザの最小バージョンと releaseDate を決定 • 5) usedFeatures は Blinkバージョン降順に並べ替え • 6) ブロック→ファイル→ディレクトリへ集計(Route集計は将来)
使い方(デモ想定) • pnpm vue-browscan analyze "src/**/*.{vue,css,scss,less,pcss}" --format json,csv --out ./reports
• (オプション)--upload で Google Sheets へアップロード • VUEBROWSCAN_SHEET_ID 未設定なら起動時にIDを対話入力 • CSV:ファイル1行、chrome_style / firefox_style / safari_style / edge_style / usedFeatures_top
得られる価値 • リリース会議で即答:「このコンポーネントは Safari 15 以上必須」 • レビュー効率:差分で“要件を引き上げるCSS”が一目でわかる • CIガード:既定のサポート範囲を超えたら
Fail 可能 • 説明責任:機能→最小バージョン→リリース日まで根拠付きで提示
アーキテクチャ(要点) • Node 22+ / ESM / pnpm • Plugin式:analyze(content,
context)(関数型・ステートレス) • AnalyzeResult:usedFeatures(Blink降順)/ browsers{version,releaseDate} / mimeHint / lang / startRow / rowCount • JSONはブロック単位、CSVはファイル単位(template/script/style列)
現状と次の一歩 • Done:CSV出力 / SFC分解・並列解析の土台 / Biome+Stylelint 整備 • Next:CSS機能→BCDマッピングの精度強化、releaseDate付与の拡充、ディレクト
リ集計の仕上げ(Route集計は設計ドラフト)
制約(MVP) • CSSにフォーカス(HTML/JS/TSは次フェーズ) • JS↔CSSの動的依存(v-bind()のCSS変数、DOM操作でのstyle変更)は未対応 • URLスキャン/パフォーマンス/SEO/監査系は対象外
ご清聴ありがとうございました! 反応があるようならnpmで公開しますー