feat: css source map support
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- css, typescript
調査の方向性
Start by tracing the existing sourceMap option through the build and development pipelines, then inspect how CSS is passed to plugins such as @stencil/sass and through the minifyCss option. The issue proposes extending the option and carrying maps into runtime style tags, including style modes, but names no files or tests. Done means CSS maps work in build and development and can be used by browser developer tools.
索引モデルが issue の本文から書いたものです。
説明
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already include this feature request, without success.
Describe the Feature Request
Add native support for generating CSS source maps during the build and development processes.
Currently, Stencil supports JavaScript/TypeScript source maps, but lacks built-in generation for CSS source maps. This makes it difficult to trace compiled styles back to their original source files within the browser's developer tools.
Describe the Use Case
When developing large-scale design systems with Stencil, styles are often written using complex Sass/PostCSS setups or split across multiple utility files.
CSS source maps will allow developers to inspect an element and see the exact source file, improving the developer experience.
In addition coverage for CSS can be generated and mapped back to the responsible file.
Describe Preferred Solution
the current sourceMap option could be extended:
type SourceMapOption = boolean | {
css?: boolean,
js?: boolean,
}
This option must then be pass to plugins like @stencil/sass.
The internal minifier (minifyCss option) must also chain the source map.
to avoid any source map reference comment in the code which could interfere with normal source maps the output component could be extended:
const myComponentCss = () => ``;
const MyComponent = class {};
MyComponent.style = myComponentCss();
MyComponent.sourceMap = 'path to source map or inline source map';
the runtime can then inject both the style and sourceMap to the style tag.
to also support style modes the souceMap property can also be an object matching the name of the currently mounted style
Describe Alternatives
No response
Related Code
No response
Additional Information
No response
- 主要言語
- TypeScript
- スター
- 13.2k
- フォーク
- 870
- 平均マージ
- 2日 54分
- マージ済み PR(30日)
- 50
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
stenciljs/core のほかの issue
-
bug: v5 dist/types/components.d.ts imports @stencil/core/runtime instead of ./stencil-public-runtimeオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
Stencil FOUC styles should use @layer to avoid cascade conflicts with React 19対応中かも @johnjenkins が 241 日前に担当しました。 オープンStencil v5
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
bug: v5 streamed SSR host is released too early when a script inserts a node while it is parsedオープン
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
メンテナーはふだん 1 日以内に返信
-
feat: write reflected attributes when the prop changes, not on the next render対応中かも @johnjenkins が 241 日前に担当しました。 オープンStencil v5
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
posit-dev/positron-sas-extension#196 ·
メンテナーはふだん 1 日以内に返信
-
bug composer
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
inmanta/web-console#8037 ·
メンテナーはふだん 1 日以内に返信
-
check:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信