Atomic atomizer running before custom preprocessor
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- scss
- 領域
- build-system, frontend
調査の方向性
issue に記載されているカスタムプリプロセッサ設定と @linaria/atomic の再現手順から始めます。アトミック抽出が前処理より先に実行されるかを追跡します。完了条件は、宣言がアトミックスタイルに分割される前に SCSS 変数がコンパイルされることです。
索引モデルが issue の本文から書いたものです。
説明
Environment
{
"dependencies": {
"@linaria/atomic": "^6.2.0",
"@linaria/core": "6.2.0",
"@linaria/react": "6.2.1",
"@wyw-in-js/babel-preset": "0.5.3",
"@wyw-in-js/shared": "0.5.3",
"@wyw-in-js/transform": "0.5.3",
"@wyw-in-js/vite": "0.5.3"
}
}
linaria({
sourceMap: isDev,
preprocessor: (selector, cssText) => {
try {
const result = sass.compileString(`${selector} {${cssText}}\n`);
return result.css.toString();
} catch (error) {
console.error("Error processing SCSS:", error);
return "";
}
}
})
- Linaria version:
6.2.0 - Bundler (+ version):
- Node.js version:
v20.8.0 - OS:
windows 11
Description
I am using a SCSS preprocessor (with great success), but getting errors when trying out the @linaria/atomic package.
I think, and created a small test which I believe confirms this, that the atomizer is running before the preprocessor (which naturally causes problems since all the SCSS needs to be compiled together, after which it can be safely atomized).
Simple example below showing the SCSS variable is not compiled when the atomizer is ran, resulting in color: $purple-900; being split out before SCSS can compile it alongside the variable declaration.
NB this example works just fine when using
@linaria/core, the error is exclusive to@linaria/atomic
Reproducible Demo
Use the a custom preprocessor alongside @linaria/atomic.
- 主要言語
- TypeScript
- スター
- 12.4k
- フォーク
- 413
- 平均マージ
- 3日 4時間
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
callstack/linaria のほかの issue
-
enhancement: proposal 💬 needs: triage 🏷
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
feature: proposal 💬 needs: triage 🏷
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
cat: modules aliasing 🔗 enhancement: proposal 💬 needs: triage 🏷
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
enhancement: proposal 💬 needs: triage 🏷
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
feature: proposal 💬 needs: triage 🏷
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
callstack/linaria の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
microsoft/playwright#43327 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/TypeScript#64758 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
opensearch-project/OpenSearch-Dashboards#12937 ·
メンテナーはふだん 2 日以内に返信
-
Liveness marks block-included attesters live in the block's epoch instead of the attestation's epochオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
status: needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
a2ui-project/a2ui#3158 ·
メンテナーはふだん 2 日以内に返信