Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2022-10-12のJS: Rollup v3、Volar 1.0(Vue LSP)、Satori(HTML + CSS = SVG) #1013

Merged
merged 25 commits into from Oct 12, 2022

Conversation

azu
Copy link
Member

@azu azu commented Oct 12, 2022

Rollup 3.0.0がリリースされました。

破壊的な変更として、プラグインのAPIの変更、オプションの変更が行われています。
また、デフォルトでimport()を維持するように変更、chunkのアルゴリズムの変更なども含まれています。
そのほかには、デフォルトでNode.jsのESMサポートとの相互運用性を改善するためにoutput.interop/output.exports/output.esModuleオプションのデフォルト値が変更されています。

基本的には__esModuleというNode.jsが考慮しない(ESMとCJSの総合運用性のために使われていた)プロパティを減らす方向になっています。詳しい変更内容は次のPRを参照すると良さそうです。

加えて、ECMAScript Proposal Stage 3のImport Assertionsのサポートも追加されています。


VueテンプレートのIDEサポートなどを提供するVolar 1.0がリリースされました。

<template lang="pug">のbuilt-inサポートを終了しプラグイン化されています。
vue-tsc--watch--declaration --emitDeclarationOnlyをサポートしています。
また、コアモジュールがVueなどのフレームワークに依存しなくなるなり、サンプルとしてSvelte Langauge Server Exampleが公開されています。


HTMLとCSSで書いたコードをSVG画像へと変換するSatoriというライブラリが公開されています。

OGP(OG)イメージのために、コンテンツに基づいた画像を生成することが増えています。
Puppeteerなどを利用すればHTMLとCSSで書いたデザインから画像(スクリーンショット)を再生することはできました。
しかし、ブラウザプロセスを立ち上げると時間がかかったりリソースの消費も大きいです。

そのため、SatoriではFlexboxのレイアウトエンジンを実装として知られるYogaのWasmビルド版を使い、HTMLとCSSのサブセットを実装しSVGを生成しています。

次の記事で詳しい解説が書かれています。

@azu azu merged commit b5c546c into develop Oct 12, 2022
@azu azu deleted the jser-week-613 branch October 12, 2022 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant